This page was exported from Free valid test braindumps [ http://free.validbraindumps.com ] Export date:Sat Apr 12 19:28:13 2025 / +0000 GMT ___________________________________________________ Title: Get Ready to Pass the CRT-600 exam with Salesforce Latest Practice Exam [Q23-Q45] --------------------------------------------------- Get Ready to Pass the CRT-600 exam with Salesforce Latest Practice Exam Get Prepared for Your CRT-600 Exam With Actual Salesforce Study Guide! NO.23 Refer to code below:Let first = ‘who’;Let second = ‘what’;Try{Try{Throw new error(‘Sad trombone’);}catch (err){First =’Why’;}finally {Second =’when’;} catch (err) {Second =’Where’;}What are the values for first and second once the code executes ?  First is Who and second is When  First is why and second is where  First is who and second is where  First is why and second is when NO.24 Given the code below:const delay = async delay =>{return new Promise((resolve,reject)=>{console.log(1);setTimeout(resolve,deleay);});};const callDelay = async ()=>{console.log(2);const yup = await delay(1000);console.log(3);}console.log(4);callDelay();console.log(5);What is logged to the console?  4 2 1 5 3 NO.25 A test has a dependency on database. query. During the test, the dependency is replaced with an object called database with the method, Calculator query, that returns an array. The developer does not need to verify how many times the method has been called.Which two test approaches describe the requirement?Choose 2 answers  White box  Stubbing  Black box  Substitution NO.26 A developer is setting up a Node,js server and is creating a script at the root of the source code, index,js, that will start the server when executed. The developer declares a variable that needs the folder location that the code executes from.Which global variable can be used in the script?  window.location  _filename  _dirname  this.path NO.27 A developer wrote a fizzbuzz function that when passed in a number, returns the following:* ‘Fizz’ if the number is divisible by 3.* ‘Buzz’ if the number is divisible by 5.* ‘Fizzbuzz’ if the number is divisible by both 3 and 5.* Empty string if the number is divisible by neither 3 or 5.Which two test cases will properly test scenarios for the fizzbuzz function?Choose 2 answers  let res = fizzbuzz(5);console.assert ( res === ‘ ‘ );  let res = fizzbuzz(15);console.assert ( res === ‘ fizzbuzz ‘ )  let res = fizzbuzz(Infinity);console.assert ( res === ‘ ‘ )  let res = fizzbuzz(3);console.assert ( res === ‘ buzz ‘ ) NO.28 Which code statement below correctly persists an objects in local Storage ?  const setLocalStorage = (storageKey, jsObject) => {window.localStorage.setItem(storageKey, JSON.stringify(jsObject));}  const setLocalStorage = ( jsObject) => {window.localStorage.connectObject(jsObject));}  const setLocalStorage = ( jsObject) => {window.localStorage.setItem(jsObject);}  const setLocalStorage = (storageKey, jsObject) => {window.localStorage.persist(storageKey, jsObject);} NO.29 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:  Installs 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.  Uses non-blocking functionality for performant request handling . NO.30 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 ( ) { NO.31 Refer to the code below:Let str = ‘javascript’;Str[0] = ‘J’;Str[4] = ‘S’;After changing the string index values, the value of str is ‘javascript’. What is the reason for this value:  Non-primitive values are mutable.  Non-primitive values are immutable.  Primitive values are mutable.  Primitive values are immutable. NO.32 A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript. The website includes multiple external resources that are loaded when the page is opened.To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage Is loaded and there Is no need to wait for the resources to be available.Which statement should be used to call personalizeWebsiteContent based on the above business requirement?  windows,addEventListener(‘load’, personalizeWebsiteContent);  windows,addEventListener(‘DOMContent Loaded ‘, personalizeWebsiteContent);  windows,addEventListener(‘onload’, personalizeWebsiteContent);  windows,addEventListener(‘onDOMCContentLoaded’, personalizeWebsiteContent); NO.33 Universal Container(UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions that cause this problem. To verify this, the developer decides to do everything and log the time each of these three suspicious functions consumes.console.time(‘Performance’);maybeAHeavyFunction();thisCouldTakeTooLong();orMaybeThisOne();console.endTime(‘Performance’);Which function can the developer use to obtain the time spent by every one of the three functions?  console.timeLog()  console.getTime()  console.trace()  console.timeStamp() NO.34 Refer to the code below:Const pi = 3.1415326,What is the data type of pi?  Double  Number  Decimal  Float NO.35 Given the HTML below:Which statement adds the priority-account css class to the Applied Shipping row?  document.querySelector(‘#row-as’).classList.add(‘priority-account’); NO.36 Refer to the code snippet below:Let array = [1, 2, 3, 4, 4, 5, 4, 4];For (let i =0; i < array.length; i++){if (array[i] === 4) {array.splice(i, 1);}}What is the value of the array after the code executes?  [1, 2, 3, 4, 5, 4, 4]  [1, 2, 3, 4, 4, 5, 4]  [1, 2, 3, 4, 5, 4]  [1, 2, 3, 5] NO.37 GIven a value, which three options can a developer use to detect if the value is NaN?Choose 3 answers !  value == NaN  Object.is(value, NaN)  value === Number.NaN  value ! == value  Number.isNaN(value) NO.38 A developer creates a generic function to log custom messages in the console. To do this, the function below is implemented.01 function logStatus(status){02 console./*Answer goes here*/{‘Item status is: %s’, status};03 }Which three console logging methods allow the use of string substitution in line 02?  Assert  Log  Message  Info  Error NO.39 A developer has code that calculates a restaurant bill, but generates incorrect answers while 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. NO.40 A developer receives a comment from the Tech Lead that the code given below has error:const monthName = ‘July’;const year = 2019;if(year === 2019) {monthName = ‘June’;}Which line edit should be made to make this code run?  01 let monthName =’July’;  02 let year =2019;  02 const year = 2020;  03 if (year == 2019) { NO.41 Which three actions can be using the JavaScript browser console?Choose 3 answers:  View and change DOM the page.  Display a report showing the performance of a page.  Run code that is not related to page.  view , change, and debug the JavaScript code of the page.  View and change security cookies. NO.42 Refer to the code:Given the code above, which three properties are set pet1?Choose 3 answers:  Name  canTalk  Type  Owner  Size NO.43 Refer to the code below:Const searchTest = ‘Yay! Salesforce is amazing!” ;Let result1 = searchText.search(/sales/i);Let result 21 = searchText.search(/sales/i);console.log(result1);console.log(result2);After running this code, which result is displayed on the console?  > true > false  > 5 >undefined  > 5 > -1  > 5 > 0 NO.44 Given the code below:Setcurrent URL ();console.log(‘The current URL is: ‘ +url );function setCurrentUrl() {Url = window.location.href:What happens when the code executes?  The url variable has local scope and line 02 throws an error.  The url variable has global scope and line 02 executes correctly.  The url variable has global scope and line 02 throws an error.  The url variable has local scope and line 02 executes correctly. NO.45 Given the JavaScript below:Which code should replace the placeholder comment on line 05 to highlight accounts that match the search string’  ‘yellow’ : null  null : ‘yellow’  ‘none1 : “yellow’  ‘yellow : ‘none’  Loading … Pass Your Next CRT-600 Certification Exam Easily & Hassle Free: https://www.validbraindumps.com/CRT-600-exam-prep.html --------------------------------------------------- Images: https://free.validbraindumps.com/wp-content/plugins/watu/loading.gif https://free.validbraindumps.com/wp-content/plugins/watu/loading.gif --------------------------------------------------- --------------------------------------------------- Post date: 2022-07-23 12:15:52 Post date GMT: 2022-07-23 12:15:52 Post modified date: 2022-07-23 12:15:52 Post modified date GMT: 2022-07-23 12:15:52