Practice Free Salesforce Certified JavaScript Developer Exam Online Questions
Which two options are core Node.js modules? Choose 2 answers
- A . worker
- B . isotream
- C . exception
- D . http
bar, awesome is a popular JavaScript module. the versions publish to npm are:
![]()
Teams at Universal Containers use this module in a number of projects.
A particular project has thepackage, json definition below.

A developer runs this command: npm install.
Which version of bar .awesome is installed?
- A . 1.3.1
- B . 1.3.5
- C . The command fails, because version 130 is not found
- D . 1.4.0
developer has a web server running with Node.js. The command to start the web server is node server,js. The web server started having latency issues. Instead of a one second turn around for web requests, the developer now sees a five second turnaround.
Which command can the web developer run to see what the module is doing during the latency period?
- A . DEBUG = http, https node server.js
- B . NODE_DEBUG =http, https node server.js
- C . DEBUG =true node server.js
- D . NODE_DEBUG =true node server.js
Refer to the following code block:

What is the console output?
- A . > Better student Jackie got 70% on test.
- B . > Jackie got 70% on test.
- C . > Uncaught Reference Error
- D . > Better student Jackie got 100% on test.
Given the code below:
Setcurrent URL ();
console.log(‘The current URL is: ‘ +url );
functionsetCurrentUrl() {
Url = window.location.href:
What happens when the code executes?
- A . The url variable has local scope and line 02 throws an error.
- B . The url variable has global scope and line 02 executes correctly.
- C . The url variable has global scope and line 02 throws an error.
- D . The url variable has local scope and line 02 executes correctly.
Given two expressions var1 and var2.
What are two valid ways to return the logical AND of the two expressions and ensure it is data type Boolean? Choose 2 answers:
- A . Boolean(var1 && var2)
- B . var1 && var2
- C . var1.toBoolean() && var2toBoolean()
- D . Boolean(var1) && Boolean(var2)
Refer to the code below:
Let textValue = ’1984’;
Which code assignment shows a correct way to convert this string to an integer?
- A . let numberValue = Number(textValue);
- B . Let numberValue = (Number)textValue;
- C . Let numberValue = textValue.toInteger();
- D . Let numberValue = Integer(textValue);
A developer copied a JavaScript object:

How does the developer access dan’s forstName,lastName? Choose 2 answers
- A . dan,name
- B . dan,firstname () + dan, lastName ()
- C . dan, firstName =dan.lastName
- D . dan,name ()
A developer is creating a simple webpage with a button. When a userclicks this button for the first time, a message is displayed.
The developer wrote the JavaScript code below, but something is missing. The message gets displayed every time a user clicks the button, instead of just the first time.
01 function listen(event) {
02 alert (‘Hey! I am John Doe’);
03 button.addEventListener (‘click’, listen);
Which two code lines make this code work as required? Choose 2 answers
- A . On line 02, use event.first to test if it is the first execution.
- B . On line 04, useevent.stopPropagation (),
- C . On line 04, use button.removeEventListener(‘ click”, listen);
- D . On line 06, add an option called once to button.addEventListener().
Refer to the following code:

Which statement should be added to line 09 for the code to display. The boat has a capacity of 10 people?
- A . super.size = size;
- B . ship.size size;
- C . super (size);
- D . this.size = size;
