Free JavaScript-Developer-I – Salesforce Certified JavaScript Developer I Practice Test Question

Free demo downloads

Loading demo links...

Showing 4–6 of 15 questions

Question 4

A developer implements a function that adds a few values.

Which three options can the developer invoke for this function to get a return value of 10? (Choose three.)

Select all that apply, then click Submit answer.

  • ○

    sum(5) (5)

  • ○

    sum() (10)

  • ○

    sum(5, 5) ()

  • ○

    sum(10) ()

  • ○

    sum() (5, 5)

Question 5

Which two options are core Node.js modules?

Choose 2 answers

Select all that apply, then click Submit answer.

  • ○

    worker

  • ○

    isotream

  • ○

    exception

  • ○

    http

Question 6

A developer is wondering whether to use, Promise.then or Promise.catch, especially when a promise throws an error.

Which two promises are rejected? (Choose two.)

Select all that apply, then click Submit answer.

  • ○

    new Promise(() => {throw ‘Cool error here’}).then((null, error => console.error(error)));

  • ○

    new Promise((resolve, reject) => {throw ‘Cool error here’}).catch
    (error => console.error(error));

  • ○

    Promise.reject(‘Cool error here’).then(error => console.error(error));

  • ○

    Promise.reject(‘Cool error here’).catch(error => console.error (error));