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 code below:

Which value can a developer expect when referencing country,capital,cityString?
- A . ‘London’
- B . undefined
- C . An error
- D . ‘NaN’
A developer has an is Dog function that takes one argument cat. They want to schedule the function to run every minute.
What is the correct syntax for scheduling this function?
- A . setInterval(isDog, 60000,’cat’);
Refer to the code below:

What is the value of result when the code executes?
- A . 10-10
- B . 5-5
- C . 10-5
- D . 5-10
The developer has a function that prints “Hello” to an input name.
To test this,thedeveloper created a function that returns “World”. However the following snippet does not print “Hello World”.

What can the developer do to change the code to print “Hello World”?
- A . Change line 7 to) ();
- B . Change line 2 to console.log(‘Hello’,name() );
- C . Change line 9 to sayHello(world) ();
- D . Change line 5 to function world () {
Refer to the code below:
const car = {
price:100,
getPrice:function(){
return this.price;
}
};
const customCar = Object.create(car);
customCar.price = 70;
delete customCar.price;const result = customCar.getPrice(); Whatis the value of result after the code executes?
- A . 100
- B . undefined
- C . null
- D . 70
A developer is required to write a function that calculates the sum of elements in an array but is getting undefined every time the code is executed.
The developer needs to find what is missing in the code below.
Const sumFunction = arr => {
Return arr.reduce((result, current) => {
//
Result += current;
//
), 10);
);
Which option makes the code work as expected?
- A . Replace line02 with return arr.map(( result, current) => (
- B . Replace line 04 with result = result +current;
- C . Replace line 03 with if(arr.length == 0 ) (return 0; )
- D . Replace line 05 with return result;
Which two options are core Node.js modules? Choose 2 answers
- A . worker
- B . isotream
- C . exception
- D . http
Refer to the code below:
01 const exec = (item, delay) =>{
02 newPromise(resolve => setTimeout( () => resolve(item), delay)),
03 async function runParallel() {
04 Const (result1, result2, result3) = await Promise.all{
05 [exec (‘x’, ‘100’), exec(‘y’, 500), exec(‘z’, ‘100’)]
06 );
7 return `parallel is done: $(result1)$(result2)$(result3)`;
8 }
}
}
Which two statements correctly execute the runParallel () function? Choose 2 answers
- A . Async runParallel () .then(data);
- B . runParallel (). done(function(data){return data;});
- C . runParallel () .then(data);
- D . runParallel () .then(function(data)return data
Refer to the expression below:
Let x = (‘1’ + 2) == (6 * 2);
How should this expression be modified to ensure that evaluates to false?
- A . Let x = (‘1’ + ‘2’) == (6 * 2);
- B . Let x = (‘1’ + 2) == (6 * 2);
- C . Let x = (1 + 2) == (‘6’ / 2);
- D . Let x = (1+ 2) == (6 / 2);
Refer to the code below:
letsayHello = () => {
console.log (‘Hello, world!’);
};
Which code executes say Hello once, two minutes from now?
- A . setTimeout(sayHello, 12000);
- B . setInterval(sayHello, 12000);
- C . setTimeout(sayHello(), 12000);
- D . delay(sayHello, 12000);