Practice Free Salesforce Certified JavaScript Developer Exam Online Questions
A developer needs to debug a Node.js web server because a runtime error keeps occurring at one of the endpoints.
The developer wants to test the endpoint on a local machine and make the request against a local server to look at the behavior. In the source code, the server, js file will start the server. the developer wants to debug the Node.js server only using the terminal.
Which command can the developer use to open the CLI debugger in their current terminal window?
- A . node -i server.js
- B . node inspect server,js
- C . node server,js inspect
- D . node start inspect server,js
developer wants to use a module named universalContainersLib and them callfunctions
from it.
How should a developer import every function from the module and then call the functions foo and bar?
- A . import * ad lib from ‘/path/universalContainersLib.js’;lib.foo();lib.bar();
- B . import (foo, bar) from ‘/path/universalContainersLib.js’;foo();bar();
- C . import all from ‘/path/universalContaineraLib.js’;universalContainersLib.foo();universalContainersLib.bar();
- D . import * from ‘/path/universalContaineraLib.js’;universalContainersLib.foo();universalContainersLib.bar();
developer uses the code below to format a date.

After executing, what is the value offormattedDate?
- A . May 10, 2020
- B . June 10, 2020
- C . October 05, 2020
- D . November 05, 2020
catch( arr => (
10 console.log(“Race is cancelled.”, err);
11 ));
What is the value of result when Promise.race executes?
- A . Car 3 completed the race.
- B . Car 1 crashed in the race.
- C . Car 2 completed the race.
- D . Race is cancelled.
A developer is leading the creation of a new web server for their team that will fulfill API requests from an existing client.
The team wants a web server that runs on Node.Js, and they want to use the new web framework Minimalist.Js. The lead developer wants to advocate for a more seasoned back-end framework that already has a community around it.
Which two frameworks could the lead developer advocate for? Choose 2 answers
- A . Gatsby
- B . Angular
- C . Express
- D . Koa
Refer to the code below:

What is the output of this function when called with an empty array?
- A . Return 0
- B . Return 5
- C . Return NaN
- D . Return Infinity
Refer to the code below:

What is the output of this function when called with an empty array?
- A . Return 0
- B . Return 5
- C . Return NaN
- D . Return Infinity
myArraym can have one level, two levels, or more levels.
Which statement flattens myArray when it can be arbitrarily nested?
- A . myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);
- B . myArray. join (",").split (",");
- C . [ ] .concat {. . .myArray) ;
- D . myArray.flat(Infinity);
myArraym can have one level, two levels, or more levels.
Which statement flattens myArray when it can be arbitrarily nested?
- A . myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);
- B . myArray. join (",").split (",");
- C . [ ] .concat {. . .myArray) ;
- D . myArray.flat(Infinity);
Refer to the expression below:
Let x = (‘1’ + 2) == (6 * 2);
How should this expression be modified to ensure that evaluates to false?
- A . Let x = (‘1’ + ‘2’) == (6 * 2);
- B . Let x = (‘1’ + 2) == (6 * 2);
- C . Let x = (1 + 2) == (‘6’ / 2);
- D . Let x = (1+ 2) == (6 / 2);
