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
Refer to the following code:

- A . Option A
- B . Option B
- C . Option C
- D . Option D
Refer to the code:

Given the code above, which three properties are set pet1? Choose 3 answers:
- A . Name
- B . canTalk
- C . Type
- D . Owner
- E . Size
Which function should a developer use to repeatedly execute code at a fixed interval?
- A . setIntervel
- B . setTimeout
- C . setPeriod
- D . setInteria
developer uses the code below to format a date.

After executing, what is the value offormattedDate?
- A . May 10, 2020
- B . June 10, 2020
- C . October 05, 2020
- D . November 05, 2020
Refer to code below:
Let productSKU = ‘8675309’ ;
A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with ‘sku’, and padded with zeros.
Which statement assigns the values sku0000000008675309?
- A . productSKU = productSKU .padStart (19. ‘0’).padstart(‘sku’);
- B . productSKU = productSKU .padEnd (16. ‘0’).padstart(‘sku’);
- C . productSKU = productSKU .padEnd (16. ‘0’).padstart(19, ‘sku’);
- D . productSKU = productSKU .padStart (16. ‘0’).padstart(19, ‘sku’);
Refer to the code below?
Let searchString = ‘look for this’;
Which two options remove the whitespace from the beginning of searchString? Choose 2 answers
- A . searchString.trimEnd();
- B . searchString.trimStart();
- C . trimStart(searchString);
- D . searchString.replace(/*ss*/, ‘’);
Refer to the code below:
01 const server = require(‘server’);
02 /* Insert code here */
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the servers
Which code should be inserted at the line 03 to set up an event and start the web server?
- A . Server.start ();
- B . server.on(‘ connect ’, (port) => {console.log(‘Listening on ’, port) ;})
- C . server()
- D . serve(( port) => (
- E . console.log( ‘Listening on ’, port) ;
Which two console logs outputs NaN? Choose 2 answers
- A . console.log(10/ Number(‘5’));
- B . console.log(parseInt(‘two’));
- C . console.log(10/ ‘’five);
- D . console.log(10/0);
A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.
Here is the HTML file content:
<input type =” text” value=”Hello” name =”input”>
<button type =”button” >Display </button> The developer wrote the javascript code below:
Const button = document.querySelector(‘button’);
button.addEvenListener(‘click’, () => (
Const input = document.querySelector(‘input’);
console.log(input.getAttribute(‘value’));
When the user clicks the button, the output is always “Hello”.
What needs to be done to make this code work as expected?
- A . Replace line 04 with console.log(input .value);
- B . Replace line 03 with const input = document.getElementByName(‘input’);
- C . Replace line 02 with button.addCallback(“click”, function() {
- D . Replace line 02 with button.addEventListener(“onclick”, function() {
Given the code below:

Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute?
- A . console.group(usersList) ;
- B . console.table(usersList) ;
- C . console.info(usersList) ;
- D . console.groupCol lapsed (usersList) ;