Free CRT-600 Exam Braindumps
Prepare for your JavaScript Developer I Certification Exam Questions 86–90 (page: 19)

Updated On: 10-Feb-2026

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



Refer to the following code:
function test (val) {
If (val === undefined) {
return `Undefined values!' ;
}
if (val === null) {
return `Null value! ';
}
return val;
}
Let x;
test(x);
What is returned by the function call on line 13?

  1. Undefined
  2. Line 13 throws an error.
  3. `Undefined values!'
  4. `Null value!'

Answer(s): C



Which code statement below correctly persists an objects in local Storage ?

  1. const setLocalStorage = (storageKey, jsObject) => {
    window.localStorage.setItem(storageKey, JSON.stringify(jsObject)); }
  2. const setLocalStorage = ( jsObject) => {
    window.localStorage.connectObject(jsObject));
    }
  3. const setLocalStorage = ( jsObject) => {
    window.localStorage.setItem(jsObject);
    }
  4. const setLocalStorage = (storageKey, jsObject) => {
    window.localStorage.persist(storageKey, jsObject);
    }

Answer(s): A



Viewing page 19 of 46
Viewing questions 91 - 95 out of 224 questions


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

AI Tutor AI Tutor 👋 I’m here to help!