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:
let inArray = [ [1, 2], [3, 4, 5] ];
Which two statements result in the array [1, 2, 3, 4, 5]?
(With corrected typing errors: usArray → inArray, .. → ....)
Given the code:
const copy = JSON.stringify([new String( ' false ' ), new Boolean(false), undefined]);
What is the value of copy?
A developer is setting up a new Node.js server with a client library that is built using events and callbacks.
The library:
Will establish a web socket connection and handle receipt of messages to the server.
Will be imported with require, and made available with a variable called ws.
The developer also wants to add error logging if a connection fails.
Given this information, which code segment shows the correct way to set up a client with two events that listen at execution time?
Refer to the code below:
01 let sayHello = () = > {
02 console.log( ' Hello, World! ' );
03 };
Which code executes sayHello once , two minutes from now?
A developer executes:
document.cookie;
document.cookie = ' key=John Smith ' ;
What is the behavior?
Refer to the code:
01 const exec = (item, delay) = >
02 new Promise(resolve = > setTimeout(() = > resolve(item), delay));
03
04 async function runParallel() {
05 const [result1, result2, result3] = await Promise.all(
06 [exec( ' x ' , ' 100 ' ), exec( ' y ' , ' 500 ' ), exec( ' z ' , ' 100 ' )]
07 );
08 return `parallel is done: ${result1}${result2}${result3}`;
09 }
Which two statements correctly execute runParallel()?
01 function changeValue(obj) {
02 obj.value = obj.value / 2;
03 }
04 const objA = {value: 10};
05 const objB = objA;
06
07 changeValue(objB);
08 const result = obj
A.
value;What is the value of result after the code executes?
Given a value, which three options can a developer use to detect if the value is NaN?
A developer initiates a server with the file server.js and adds dependencies in the source code ' s package.json that are required to run the server.
Which command should the developer run to start the server locally?
