JavaScript-Developer-I Practice Questions
Salesforce Certified JavaScript Developer (JS-Dev-101)
Last Update 1 day ago
Total Questions : 147
Dive into our fully updated and stable JavaScript-Developer-I practice test platform, featuring all the latest Salesforce Developer exam questions added this week. Our preparation tool is more than just a Salesforce study aid; it's a strategic advantage.
Our free Salesforce Developer practice questions crafted to reflect the domains and difficulty of the actual exam. The detailed rationales explain the 'why' behind each answer, reinforcing key concepts about JavaScript-Developer-I. Use this test to pinpoint which areas you need to focus your study on.
Refer to the code below:
01 function myFunction(reassign) {
02 let x = 1;
03 var y = 1;
04
05 if (reassign) {
06 let x = 2;
07 var y = 2;
08 console.log(x);
09 console.log(y);
10 }
11
12 console.log(x);
13 console.log(y);
14 }
What is displayed when myFunction(true) is called?
Considering type coercion, what does the following expression evaluate to?
true + ' 13 ' + NaN
Given two expressions, exp1 and exp2, which two valid ways return the logical AND of the two expressions and ensure it is a Boolean?
let sampleText = " The quick brown fox jumps " ;
Which three expressions return true for a substring?
Refer to the following object:
01 const cat = {
02 firstName: ' Fancy ' ,
03 lastName: ' Whiskers ' ,
04 get fullName(){
05 return this.firstName + ' ' + this.lastName;
06 }
07 };
How can a developer access the fullName property for cat?
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?
(With corrected typing errors: node_inspect → node inspect, node_start_inspect → node start inspect.)
Which statement accurately describes the behavior of the async/await keywords?
A developer is asked to fix some bugs reported by users. To do that, the developer adds a breakpoint for debugging.
01 function Car(maxSpeed, color) {
02 this.maxSpeed = maxSpeed;
03 this.color = color;
04 }
05 let carSpeed = document.getElementById( ' carSpeed ' );
06 debugger;
07 let fourWheels = new Car(carSpeed.value, ' red ' );
When the code execution stops at the breakpoint on line 06, which two types of information are available in the browser console?
Refer to the code below:
01 let first = ' Who ' ;
02 let second = ' What ' ;
03 try {
04 try {
05 throw new Error( ' Sad trombone ' );
06 } catch (err) {
07 first = ' Why ' ;
08 throw err;
09 } finally {
10 second = ' When ' ;
11 }
12 } catch (err) {
13 second = ' Where ' ;
14 }
What are the values for first and second once the code executes?
Corrected code:
function Person() {
this.firstName = " John " ;
}
Person.prototype = {
job: x = > " Developer "
};
const myFather = new Person();
const result = myFather.firstName + " " + myFather.job();
What is the value of result after line 10 executes?
