JavaScript Developer I Demo
JavaScript Developer I Demo
JavaScript Developer I Demo
(SU23)
Salesforce JavaScript-Developer-I
Version Demo
https://dumpsboss.com
support@dumpsboss.com
QUESTION NO: 1
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
ANSWER: B
QUESTION NO: 2
Function getAvailabilityMessage(item) {
If (getAvailability(item)){
Return msg;
A developer writes this code to return a message to user attempting to register a new
A. “Username available”
B. “newUserName”
D. undefined
QUESTION NO: 3
Option A:
function Monster() {
This.growl = () => {
Console.log (“Grr!”);
Option B:
console.log(“Grr!”);
A. 1 growl method is created for Option 1000 growl methods are created for Option B.
B. 1000 growl method is created for Option A. 1 growl methods are created for Option B.
ANSWER: B
QUESTION NO: 4
Which three actions can be done using the JavaScript browser console? (Choose three.)
ANSWER: A B C
QUESTION NO: 5
Let arr1 = [ 1, 2, 3, 4, 5 ];
Which two lines of code result in a second array, arr2 being created such that arr2 is not
a reference to arr1?
ANSWER: A B
x=3.14;
function myfunction() {
"use strict";
z=x;
myFunction();
ANSWER: SeetheAnswerbelowinexplanation:
Explanation:
Z is equal to 3.14
QUESTION NO: 7
A. console.log(parseInt(‘two’));
B. console.log(10 / Number(‘5’));
C. console.log(10 / 0);
D. console.log(10 / ‘five’);
ANSWER: A D
QUESTION NO: 8
A developer is trying to convince management that their team will benefit from using Node.js for a backend server that they
are going to create. The server will be a web server that handles API requests from a website that the team has already built
using HTML, CSS, and JavaScript.
Which three benefits of Node.js can the developer use to persuade their manager? (Choose three.)
C. Installs with its own package manager to install and manage third-party libraries
D. Performs a static analysis on code before execution to look for runtime errors
QUESTION NO: 9
Which three browser specific APIs are available for developers to persist data between page loads ?
Choose 3 answers
A. IIFEs
B. indexedDB
C. Global variables
D. Cookies
E. localStorage.
ANSWER: A B E
QUESTION NO: 10
console.log(‘Timer called.”);
};
A. removeTimeout(timedFunction);
B. removeTimeout(timerId);
C. clearTimeout(timerId);
D. clearTimeout(timedFunction);
ANSWER: C
QUESTION NO: 11
console.log(‘’start);
console.log(‘Success’);
});
console.log(‘End’);
A. End
Start
Success
B. Start
Success
End
C. Start
End
Success
D. Success
Start
End
ANSWER: C
QUESTION NO: 12
class Animal{
constructor(name){
this.name = name;
makeSound(){
constructor(name){
super(name)
this.name = name;
makeSound(){
console.log(`${this.name} is barking.`)
myDog.makeSound();
A. Puppy is barking
ANSWER: A
QUESTION NO: 13
let x = null;
console.log(typeof x);
A. "object"
B. "undefined"
C. "null"
D. "x"
ANSWER: A
QUESTION NO: 14
A developer is creating a simple webpage with a button. When a user clicks 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.
ANSWER: A D
QUESTION NO: 15
A developer wrote a fizzbuzz function that when passed in a number, returns the following:
‘fizzbuzz’ if the number is divisible by both 3 and 5 empty string if the number is divisible by neither 3 or 5 Which two test
cases will properly test scenarios for the fizzbuzz function? (Choose two.)
ANSWER: B C