Free CRT-600 Exam Braindumps (page: 1)

Page 1 of 57

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

  1. Async runParallel () .then(data);
  2. runParallel ( ). done(function(data){
    return data;});
  3. runParallel () .then(data);
  4. runParallel () .then(function(data)
    return data

Answer(s): B,D



A developer needs to test this function:
01 const sum3 = (arr) => (
02 if (!arr.length) return 0,
03 if (arr.length === 1) return arr[0],
04 if (arr.length === 2) return arr[0] + arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function? Choose 2 answers

  1. console.assert(sum3(1, `2')) == 12);
  2. console.assert(sum3(0)) == 0);
  3. console.assert(sum3(-3, 2 )) == -1);
  4. console.assert(sum3(`hello', 2, 3, 4)) === NaN);

Answer(s): A,C



Which statement phrases successfully?

  1. JSON.parse ( ` foo ' );
  2. JSON.parse ( " foo " );
  3. JSON.parse( " ` foo ' " );
  4. JSON.parse(` " foo " ');

Answer(s): D



Refer to the code below:
01 let car1 = new promise((_, reject) =>
02 setTimeout(reject, 2000, "Car 1 crashed in"));
03 let car2 = new Promise(resolve => setTimeout(resolve, 1500, "Car 2 completed"));
04 let car3 = new Promise(resolve => setTimeout (resolve, 3000, "Car 3 Completed"));
05 Promise.race([car1, car2, car3])
06 .then(value => (
07 let result = $(value) the race. `;
08 ))
09 .catch( arr => (
10 console.log("Race is cancelled.", err);

11 ));
What is the value of result when Promise.race executes?

  1. Car 3 completed the race.
  2. Car 1 crashed in the race.
  3. Car 2 completed the race.
  4. Race is cancelled.

Answer(s): C



Page 1 of 57



Post your Comments and Discuss Salesforce CRT-600 exam with other Community members:

Raider69 4/25/2022 10:24:35 AM
Xengine App makes studying more fun.
UNITED STATES
upvote