Salesforce JavaScript Developer I Practice Exams
Last updated on Nov 16,2026- Exam Code: JavaScript Developer I
- Exam Name: Salesforce Certified JavaScript Developer I
- Certification Provider: Salesforce
- Latest update: Nov 16,2026
Given the following code:
let x = null;
console.log(typeof x);
What is the output?
- A . "object"
- B . "undefined"
- C . "null"
- D . "x"
A developer has the function, shown below, that is called when a page loads.

Where can the developer see the log statement after loading the page in the browser?
- A . On the browser JavaScriptconsole
- B . On the terminal console running the web server
- C . In the browser performance tools log
- D . On the webpage console log
Given the following code:
Let x =null;
console.log(typeof x);
What is the output of the line 02?
- A . “Null”
- B . “X”
- C . “Object”
- D . “undefined”
Which two console logs output NaN? Choose 2 answers | |
- A . console.log(10 / Number(‘5) ) ;
- B . console.log(parseInt ‘ ("two’)) ;
- C . console.log(10 / 0);
- D . console.loeg(10 / ‘five’);
Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i < array.length; i++)
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of array after the code executes?
- A . [1,2, 3, 4, 5, 4, 4]
- B . [1, 2, 3, 4, 4, 5, 4]
- C . [1, 2, 3, 5]
- D . [1, 2, 3, 4, 5, 4]
A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below:
Import printPrice from ‘/path/PricePrettyPrint.js’;
Based on the code, what mustbe true about the printPrice function of the PricePrettyPrint module for this import to work?
- A . printPrice must be be a named export
- B . printPrice must be an all export
- C . printPrice must be the default export
- D . printPrice must be a multi exportc
Refer to the string below:
const str = ‘Salesforce’;
Which two statements result in the word ‘Sales’? Choose 2 answers
- A . str.substr(1, 5);
- B . str.substr (0, 5);
- C . str.substring (1, 5);
- D . str.substring (0, 5);
Given the JavaScript below:

Which code should replace the placeholder comment on line 06 to hide accounts that do not match the search string?
- A . ‘None’: ‘block’
- B . ‘Visible: ’hidden’
- C . ‘Hidden, visible
- D . ‘Block’: ‘none’
Which two code snippets show working examples of a recursive function? Choose 2 answers
- A . Let countingDown = function(startNumber) {
If ( startNumber >0) {
console.log(startNumber) ;
return countingDown(startNUmber);
} else {
return startNumber;
}}; - B . Function factorial ( numVar ) {
If (numVar < 0) return;
If ( numVar === 0 ) return 1;
return numVar -1; - C . Const sumToTen = numVar => {
If (numVar < 0)
Return;
return sumToTen(numVar + 1)}; - D . Const factorial =numVar => {
If (numVar < 0) return;
If ( numVar === 0 ) return 1;
return numVar * factorial ( numVar – 1 );
};
Refer to the code declarations below:
![]()
Which three expressions return the string JavaScript? Choose 3 answers
- A . Str1.join (str2);
- B . Str1.concat (str2);
- C . Concat (str1, str2);
- D . $(str1) $ (str2} ‘;
- E . Str1 + str2;