Free CRT-600 Exam Braindumps (page: 23)

Page 22 of 57

Refer to the code below:
let sayHello = () => {
console.log (`Hello, world!');
};
Which code executes sayHello once, two minutes from now?

  1. setTimeout(sayHello, 12000);
  2. setInterval(sayHello, 12000);
  3. setTimeout(sayHello(), 12000);
  4. delay(sayHello, 12000);

Answer(s): A



What is the result of the code block?

  1. The console logs only `flag'.
  2. The console logs `flag' and another flag.
  3. An error is thrown.
  4. The console logs `flag' and then an error is thrown.

Answer(s): D



Refer to the following code that imports a module named utils:
import (foo, bar) from `/path/Utils.js';
foo() ;
bar() ;
Which two implementations of Utils.js export foo and bar such that the code above runs without error?
Choose 2 answers

  1. // FooUtils.js and BarUtils.js exist
    Import (foo) from `/path/FooUtils.js';

    Import (boo) from ` /path/NarUtils.js';
  2. const foo = () => { return `foo' ; }
    const bar = () => { return `bar' ; }
    export { bar, foo }
  3. Export default class {
    foo() { return `foo' ; }
    bar() { return `bar' ; }
    }
  4. const foo = () => { return `foo';}
    const bar = () => {return `bar'; }
    Export default foo, bar;

Answer(s): B,C



developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality. The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
Given the code and the information the developer has, which code logs an error at boost with an event?

  1. Server.catch ((server) => {
    console.log(`ERROR', error);
    });
  2. Server.error ((server) => {
    console.log(`ERROR', error);
    });
  3. Server.on (`error', (error) => {
    console.log(`ERROR', error);
    });
  4. Try{
    server.start();
    } catch(error) {
    console.log(`ERROR', error);
    }

Answer(s): C






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

CRT-600 Discussions & Posts