Get 2024 Free Salesforce CRT-600 Exam Practice Materials Collection [Q24-Q49]

Share

Get 2024 Free Salesforce CRT-600 Exam Practice Materials Collection

Get Latest and 100% Accurate CRT-600 Exam Questions

NEW QUESTION # 24
A developer uses a parsed JSON string to work with user information as in the block below:
01 const userInformation ={
02 " id " : "user-01",
03 "email" : "[email protected]",
04 "age" : 25
Which two options access the email attribute in the object?
Choose 2 answers

  • A. userInformation.get("email")
  • B. userInformation(email)
  • C. userInformation.email
  • D. userInformation("email")

Answer: C,D


NEW QUESTION # 25
Cloud Kicks has a class to represent items for sale in an online store, as shown below:
Class Item{
constructor (name, price){
this.name = name;
this.price = price;
}
formattedPrice(){
return 's' + String(this.price);}}
A new business requirement comes in that requests a ClothingItem class that should have all of the properties and methods of the Item class but will also have properties that are specific to clothes.
Which line of code properly declares the clothingItem class such that it inherits from Item?

  • A. Class ClothingItem extends Item {
  • B. Class ClothingItem {
  • C. Class ClothingItem implements Item{
  • D. Class ClothingItem super Item {

Answer: A


NEW QUESTION # 26
Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve (
setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500);
Const bPromise = await resolveAfterMilliseconds(500);
Await aPromise, wait bPromise;
What is the result of running line 05?

  • A. aPromise and bPromise run sequentially.
  • B. Only aPromise runs.
  • C. aPromise and bPromise run in parallel.
  • D. Neither aPromise or bPromise runs.

Answer: D


NEW QUESTION # 27
A developer has the function, shown below, that is called when a page loads.

Where can the developer see the log statement after loading the page in the browser?

  • A. On the webpage console log
  • B. On the terminal console running the web server
  • C. In the browser performance tools log
  • D. On the browser JavaScript console

Answer: D


NEW QUESTION # 28
A developer copied a JavaScript object:

How does the developer access dan's forstName,lastName? Choose 2 answers

  • A. dan,name
  • B. dan, firstName = dan.lastName
  • C. dan,firstname ( ) + dan, lastName ( )
  • D. dan,name ( )

Answer: B,D


NEW QUESTION # 29
Given the HTML below:

Which statement adds the priority-account CSS class to the Universal Containers row?

  • A. document. queryselector('#row-uc').ClassList.add('priority-account');
  • B. document. querySelector (#row-uc'). classes-push('priority-account');
  • C. document. getElementByid('row-uc').addClass('priority-account*);
  • D. document. querySelectorAll('#row-uc') -classList.add("priority-accour');

Answer: A


NEW QUESTION # 30
A team that works on a big project uses npm to deal with projects dependencies.
A developer added a dependency does not get downloaded when they execute npm install.
Which two reasons could be possible explanations for this?
Choose 2 answers

  • A. The developer added the dependency as a dev dependency, and
    NODE_ENV
    Is set to production.
  • B. The developer missed the option --save when adding the dependency.
  • C. The developer missed the option --add when adding the dependency.
  • D. The developer added the dependency as a dev dependency, and NODE_ENV is set to production.

Answer: A,B,D


NEW QUESTION # 31
Which code statement correctly retrieves and returns an object from localStorage?

  • A. const retrieveFromLocalStorage = (storageKey) =>{
    return window.localStorage[storageKey];
    }
  • B. const retrieveFromLocalStorage = () =>{
    return JSON.stringify(window.localStorage.getItem(storageKey));
    }
  • C. const retrieveFromLocalStorage = (storageKey) =>{
    return JSON.parse(window.localStorage.getItem(storageKey));
    }
  • D. const retrieveFromLocalStorage = (storageKey) =>{
    return window.localStorage.getItem(storageKey);
    }

Answer: C


NEW QUESTION # 32
The developer wants to test this code:
Const toNumber =(strOrNum) => strOrNum;
Which two tests are most accurate for this code?
Choose 2 answers

  • A. console.assert(toNumber('-3') < 0);
  • B. console.assert(Number.isNaN(toNumber()));
  • C. console.assert(toNumber('2') === 2);
  • D. console.assert(toNumber () === NaN);

Answer: A,C


NEW QUESTION # 33
Given the code below:
Function myFunction(){
A =5;
Var b =1;
}
myFunction();
console.log(a);
console.log(b);
What is the expected output?

  • A. Both lines 08 and 09 are executed, but values outputted are undefined.
  • B. Line 08 thrones an error, therefore line 09 is never executed.
  • C. Both lines 08 and 09 are executed, and the variables are outputted.
  • D. Line 08 outputs the variable, but line 09 throws an error.

Answer: D


NEW QUESTION # 34
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

  • A. runParallel ( ). done(function(data){
    return data;
    });
  • B. Async runParallel () .then(data);
  • C. runParallel () .then(function(data)
    return da
  • D. runParallel () .then(data);

Answer: A,C


NEW QUESTION # 35
A developer writes the code below to calculate the factorial of a given number function sum(number){ return number * sum(number-1);
}
sum(3);
what is the result of executing the code.

  • A. 0
  • B. Error
  • C. -Infinity
  • D. 1

Answer: B


NEW QUESTION # 36
After user acceptance testing, the developer is asked to change the webpage background based on user's location. This change was implemented and deployed for testing.
The tester reports that the background is not changing, however it works as required when viewing on the developer's computer.
Which two actions will help determine accurate results?
Choose 2 answers

  • A. The tester should disable their browser cache.
  • B. The developer should inspect their browser refresh settings.
  • C. The developer should rework the code.
  • D. The tester should dear their browser cache.

Answer: B,D


NEW QUESTION # 37
Given the code below:
const copy = JSON.stringify([ new String(' false '), new Bollean( false ), undefined ]); What is the value of copy?

  • A. -- [ \"false\" , { } ]--
  • B. -- [ \"false\" , false, undefined ]--
  • C. -- [ \"false\" ,false, null ]--
  • D. -- [ false, { } ]--

Answer: C


NEW QUESTION # 38
A developer writes the code below to return a message to a user attempting to register a new username. If the username is available, a variable named nag is declared and assigned a value on line 03.

What is the value of msg when getAvailableabilityMessage ("newUserName") is executed and get Availability ("newUserName") returns true?

  • A. "msg is not defined"
  • B. "newUserName"
  • C. "User-name available"
  • D. undefined

Answer: C


NEW QUESTION # 39
Considering the implications of 'use strict' on line 04, which three statements describe the execution of the code?
Choose 3 answers

  • A. 'use strict' has an effect only on line 05.
  • B. z is equal to 3.14.
  • C. 'use strict' has an effect between line 04 and the end of the file.
  • D. 'use strict' is hoisted, so it has an effect on all lines.
  • E. Line 05 throws an error.

Answer: A,B,E


NEW QUESTION # 40
A developer wants to define a function log to be used a few times on a single-file JavaScript script.
01 // Line 1 replacement
02 console.log('"LOG:', logInput);
03 }
Which two options can correctly replace line 01 and declare the function for use?
Choose 2 answers

  • A. const log(loginInput) {
  • B. const log = (logInput) => {
  • C. function leg(logInput) {
  • D. function log = (logInput) {

Answer: B,C


NEW QUESTION # 41
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?

  • A. console. timeLog ()
  • B. console.trace()
  • C. console.getTime ()
  • D. console.timeStamp ()

Answer: A


NEW QUESTION # 42
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?

  • A. cat.function.fullName()
  • B. cat.fullName
  • C. cat.fullName()
  • D. cat.get.fullName

Answer: B


NEW QUESTION # 43
Refer to the following code:

Which statement should be added to line 09 for the code to display 'The boat has a capacity of 10 people?

  • A. ship.size size;
  • B. super (size);
  • C. this.size = size;
  • D. super.size = size;

Answer: C


NEW QUESTION # 44
A developer wants to use a module named universalContainersLib and then call functions from it.
How should a developer import every function from the module and then call the functions foo and bar?

  • A. import all from '/path/universalContainersLib.js';
    universalContainersLib.foo();
    universalContainersLib.bar ();
  • B. import * as lib from '/path/universalContainersLib.js';
    lib.foo();
    lib. bar ();
  • C. import {foo,bar} from '/path/universalCcontainersLib.js';
    foo():
    bar()?
  • D. import * from '/path/universalContainersLib.js';
    universalContainersLib. foo ()7
    universalContainersLib.bar ();

Answer: B


NEW QUESTION # 45
Refer to the code below:
Let textValue = '1984';
Which code assignment shows a correct way to convert this string to an integer?

  • A. Let numberValue = textValue.toInteger();
  • B. let numberValue = Number(textValue);
  • C. Let numberValue = (Number)textValue;
  • D. Let numberValue = Integer(textValue);

Answer: B


NEW QUESTION # 46
Refer to the following code:

What is the value of output on line 11?

  • A. [1, 2]
  • B. An error will occur due to the incorrect usage of the for...of statement on line 07.
  • C. [''foo'':1, ''bar'':2'']
  • D. [''foo'', ''bar'']

Answer: B


NEW QUESTION # 47
Which two code snippets show working examples of a recursive function?
Choose 2 answers

  • A. Const sumToTen = numVar => {
    If (numVar < 0)
    Return;
    return sumToTen(numVar + 1)};
  • B. Let countingDown = function(startNumber) {
    If ( startNumber >0) {
    console.log(startNumber) ;
    return countingDown(startNUmber);
    } else {
    return startNumber;
    }};
  • C. Const factorial =numVar => {
    If (numVar < 0) return;
    If ( numVar === 0 ) return 1;
    return numVar * factorial ( numVar - 1 );
    };
  • D. Function factorial ( numVar ) {
    If (numVar < 0) return;
    If ( numVar === 0 ) return 1;
    return numVar -1;

Answer: B,C


NEW QUESTION # 48
Which three statements are true about promises ?
Choose 3 answers

  • A. The executor of a new Promise runs automatically.
  • B. A Promise has a .then() method.
  • C. A fulfilled or rejected promise will not change states .
  • D. A pending promise can become fulfilled, settled, or rejected.
  • E. A settled promise can become resolved.

Answer: B,C,D


NEW QUESTION # 49
......

Maximum Grades By Making ready With CRT-600 Dumps: https://itexams.lead2passed.com/Salesforce/CRT-600-practice-exam-dumps.html