Salesforce Certified JavaScript Developer I Practice Test - Questions Answers, Page 15
List of questions
Related questions
Refer to code below:
Const objBook = {
Title: 'Javascript',
}; Object.preventExtensions(objBook);
Const newObjBook = objBook;
newObjectBook.author = 'Robert';
What are the values of objBook and newObjBook respectively ?
Refer to code below:
console.log(0);
setTimeout(() => (
console.log(1);
});
console.log(2);
setTimeout(() => {
console.log(3);
), 0);
console.log(4);
In which sequence will the numbers be logged?
A developer implements and calls the following code when an application state change occurs:
Const onStateChange =innerPageState) => {
window.history.pushState(newPageState, ' ', null);
}
If the back button is clicked after this method is executed, what can a developer expect?
Refer to the expression below:
Let x = ('1' + 2) == (6 * 2);
How should this expression be modified to ensure that evaluates to false?
A developer wants to define a function log to be used a few times on a single-file JavaScript script.
01 // Line 1 replacement
02 console.log('"LOG:', logInput);
03 }
Which two options can correctly replace line 01 and declare the function for use?
Choose 2 answers
A developer wants to use a module named universalContainersLib and then call functions from it.
How should a developer import every function from the module and then call the functions foo and bar?
Which two console logs output NaN?
Choose 2 answers | |
A developer wants to use a try...catch statement to catch any error that countSheep () may throw and pass it to a handleError () function.
What is the correct implementation of the try...catch?
A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the function to run once after five seconds.
What is the correct syntax to schedule this function?
Which statement parses successfully?
Question