Free Salesforce JS-Dev-101 Exam Practice Questions
Salesforce Certified JavaScript Developer
Total Questions: 147Focus Only on What Matters For Salesforce JS-Dev-101 Exam Preparation
Many candidates desire to prepare their Salesforce JS-Dev-101 exam with the help of only updated and relevant study material. But during their research, they usually waste most of their valuable time with information that is either not relevant or outdated. Study4Exam has a fantastic team of subject-matter experts that make sure you always get the most up-to-date preparatory material. Whenever there is a change in the syllabus of the Salesforce Certified JavaScript Developer exam, our team of experts updates JS-Dev-101 questions and eliminates outdated questions. In this way, we save you money and time.
Salesforce JS-Dev-101 Exam Sample Questions & Answers
Function to test:
01 const sum3 = (arr) => {
02 if (!arr.length) return 0;
03 if (arr.length === 1) return arr[0];
04 if (arr.length === 2) return arr[0] + arr[1];
05 return arr[0] + arr[1] + arr[2];
06 };
Which two assert statements are valid tests for this function?
Given the following code:
01 counter = 0;
02 const logCounter = () => {
03 console.log(counter);
04 };
05 logCounter();
06 setTimeout(logCounter, 2100);
07 setInterval(() => {
08 counter++;
09 logCounter();
10 }, 1000);
What will be the first four numbers logged?
01 let a = "*";
02 let b = "**";
/ 7 x = 3;
04 console.log(a);
What is displayed when the code executes?
A developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality. The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
Which code logs an error at boot time with an event?
Given the code below:
01 setTimeout(() => {
02 console.log(1);
03 }, 1100);
04 console.log(2);
05 new Promise((resolve, reject) => {
06 setTimeout(() => {
07 reject(console.log(3));
08 }, 1000);
09 }).catch(() => {
10 console.log(4);
11 });
12 console.log(5);
What is logged to the console?
Currently there are no comments in this discussion, be the first to comment!