This page was exported from IT Certification Exam Braindumps [ http://blog.braindumpsit.com ] Export date:Sun Apr 13 16:36:25 2025 / +0000 GMT ___________________________________________________ Title: Updated Jun-2022 Pass JavaScript-Developer-I Exam - Real Practice Test Questions [Q33-Q52] --------------------------------------------------- Updated Jun-2022 Pass JavaScript-Developer-I Exam - Real Practice Test Questions Download Free Salesforce JavaScript-Developer-I Real Exam Questions How much Salesforce JavaScript-Developer-I Exam Cost The price of the Salesforce JavaScript Developer I certification is $200 USD, for more information related to the Salesforce JavaScript-Developer-I Exam please visit Salesforce website.   Q33. developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript.Which three benefits of Node.js can the developer use to persuade their manager?Choose 3 answers:  I nstalls with its own package manager to install and manage third-party libraries.  Ensures stability with one major release every few years.  Performs a static analysis on code before execution to look for runtime errors.  Executes server-side JavaScript code to avoid learning a new language.  User non blocking functionality for performant request handling . Q34. A developer has code that calculates a restaurant bill, but generates incorrect answerswhile testing the code:function calculateBill ( items ) {let total = 0;total += findSubTotal(items);total += addTax(total);total += addTip(total);return total;}Which option allows the developer to step into each function execution within calculateBill?  Using the debugger command on line 05.  Using the debugger command on line 03  Calling the console.trace (total) method on line 03.  Wrapping findSubtotal in a console.log() method. Q35. Refer to the code below:01 const exec = (item, delay) =>{02 new Promise(resolve => setTimeout( () => resolve(item), delay)),03 async function runParallel() {04 Const (result1, result2, result3) = await Promise.all{05 [exec (‘x’, ‘100’) , exec(‘y’, 500), exec(‘z’, ‘100’)]06 );07 return `parallel is done: $(result1) $(result2)$(result3)`;08 }}}Which two statements correctly execute the runParallel () function?Choose 2 answers  Async runParallel () .then(data);  runParallel ( ). done(function(data){return data;});  runParallel () .then(data);  runParallel () .then(function(data)return data Q36. Given the code below:const delay = sync delay => {Return new Promise((resolve, reject) => {setTimeout (resolve, delay);});};const callDelay =async () =>{const yup =await delay(1000);console.log(1);What is logged to the console?  1 2 3  1 3 2  2 1 3  2 3 1 Q37. Refer to the code below:const addBy = ?const addByEight =addBy(8);const sum = addBYEight(50);Which two functions can replace line 01 and return 58 to sum?Choose 2 answers  const addBy = function(num1){return function(num2){return num1 + num2;}  const addBy = function(num1){return num1 + num2;}  const addBy = (num1) => num1 + num2 ;  const addBY = (num1) => (num2) => num1 + num2; Q38. Refer to the code below:Let textvalue = ‘1984’;Which code segment shows a correct way to convert this string to an integer?  Let numberValue = Number(textvalue);  Let numberValue = (Number) textvalue;  Let numberValue = textValue. Tointeger ( ) ;  Let numberValue = Integer ( textValue ); Q39. Refer to the code below:Let foodMenu1 = [‘pizza’, ‘burger’, ‘French fries’];Let finalMenu = foodMenu1;finalMenu.push(‘Garlic bread’);What is the value of foodMenu1 after the code executes?  [ ‘pizza’,’Burger’, ‘French fires’, ‘Garlic bread’]  [ ‘pizza’,’Burger’, ‘French fires’]  [ ‘Garlic bread’ , ‘pizza’,’Burger’, ‘French fires’ ]  [ ‘Garlic bread’] Q40. Considering type coercion, What does the following expression evaluate to?True + ) + ‘100 ‘ + null  104  4100  ‘3100null’  ‘4100null’ Q41. A developer is setting up a new Node.js server with a client library that is built using events and callbacks.The library:● Will establish a web socket connection and handle receipt of messages to the server● Will be imported with require, and made available with a variable called we.The developer also wants to add error logging if a connection fails.Given this info, which code segment shows the correct way to set up a client with two events that listen at execution time?  ws.connect (( ) => {console.log(‘connected to client’); }).catch((error) => { console.log(‘ERROR’ , error); }};  ws.on (‘connect’, ( ) => {console.log(‘connected to client’); ws.on(‘error’, (error) => { console.log(‘ERROR’ , error); });});  ws.on (‘connect’, ( ) => { console.log(‘connected to client’); }}; ws.on(‘error’, (error) => { console.log(‘ERROR’ , error); }};  try{ws.connect (( ) => {console.log(‘connected to client’); }); } catch(error) { console.log(‘ERROR’ , error); };}Q42. A developer is working on an ecommerce website where the delivery date is dynamically calculated based on the current dat. The code line below is responsible for this calculation.Const deliveryDate = new Date ( );Due to changes in the business requirements, the delivery date must now be today’s date + 9 days.Which code meets this new requirements?  deliveryDate. setDate (( new Date ()) .getDate () + 9);  deliveryDate. setDate ( Date . current () + 9 0;  deliveryDate. Date = new Date (+9) ;  deliveryDate . date = date . current () + 9 Q43. The developer has a function that prints “Hello” to an input name. To test this, thedeveloper created a function that returns “World”. However the following snippet does not print ” Hello World”.What can the developer do to change the code to print “Hello World” ?  Change line 7 to ) () ;  Change line 2 to console.log(‘Hello’ , name() );  Change line 9 to sayHello(world) ();  Change line 5 to function world ( ) { Q44. Which two console logs out NaN?Choose 2 answers  Console.log(10 / Number (‘5) );  Console.log(parseint (‘two’) ) ;  Console.log(10 / ‘five’ ‘) ;  Console.log (10 / 0); Q45. developer removes the HTML class attribute from the checkout button, so now it is simply:<button>Checkout</button>.There is a test to verify the existence of the checkout button, however it looks for a button with class= “blue”. The test fails because no such button is found.Which type of test category describes this test?  True positive  True negative  False positive  False negative Q46. A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the function to run once after five seconds.What is the correct syntax to schedule this function?  setTimeout (formatName(), 5000, “John”, “BDoe”);  setTimeout (formatName(‘John’, ”Doe’), 5000);  setTimout(() => { formatName(“John’, ‘Doe’) }, 5000);  setTimeout (‘formatName’, 5000, ‘John”, “Doe’); Q47. Refer to the code below:Line 05 causes an error.What are the values of greeting and salutation once code completes?  Greeting is Hello and salutation is Hello, Hello.  Greeting is Goodbye and salutation is Hello, Hello.  Greeting is Goodbye and salutation is I say Hello.  Greeting is Hello and salutation is I say hello. Q48. Refer to code below:function Person() {this.firstName = ‘John’;}Person.prototype ={Job: x => ‘Developer’};const myFather = new Person();const result =myFather.firstName + ‘ ‘ + myFather.job();What is the value of the result after line 10 executes?  Error: myFather.job is not a function  Undefined Developer  John undefined  John Developer Q49. Refer to the following object:const cat ={firstName: ‘Fancy’,lastName: ‘ Whiskers’,Get fullName() {return this.firstName + ‘ ‘ + this.lastName;}};How can a developer access the fullName property for cat?  cat.fullName  cat.fullName()  cat.get.fullName  cat.function.fullName() Q50. A developer needs to test this functions:Which two assert statements are valid tests for this function?  Console.assert(sum3((1, ‘2’ ]) 12 );  Console.assert(sum3([0]) 0) ;  Console.assert(sum3 ([-3, 2]) -1) ;  Console.assert(sum3 ([‘hello’ 2, 3, 4]) NaN); Q51. Refer to the code below:Which assertion accurately tests the above code?  Console, assert ( await functionalUnderTest (true) , ‘ok  Console, assert ( await functionalUnderTest (true) , ‘not ok) )  Console, assert ( await functionalUnderTest (true) , ‘not ok’ )  Console, assert (functionalUnderTest (true) , ‘ok’) Q52. Universal Containers (UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions any that might cause this problem. To verify this, the developer decides to execute everything and log the time each of these three suspicious functions consumes.Which function can the developer use to obtain the time spent by every one of the three functions?  console. timeLog ()  console.timeStamp ()  console.trace()  console.getTime ()  Loading … JavaScript-Developer-I Dumps 100 Pass Guarantee With Latest Demo: https://www.braindumpsit.com/JavaScript-Developer-I_real-exam.html --------------------------------------------------- Images: https://blog.braindumpsit.com/wp-content/plugins/watu/loading.gif https://blog.braindumpsit.com/wp-content/plugins/watu/loading.gif --------------------------------------------------- --------------------------------------------------- Post date: 2022-06-20 14:37:45 Post date GMT: 2022-06-20 14:37:45 Post modified date: 2022-06-20 14:37:45 Post modified date GMT: 2022-06-20 14:37:45