Free Salesforce JavaScript Developer Practice Test Questions

Topic: Asynchronous Programming

147 questions Updated 23-Nov-2026 7 topics
TopicAsynchronous Programming
Question 1 Choose 1
Refer to the code below:

01 async function functionUnderTest(isOK) {

02 if (isOK) return ' OK ' ;

03 throw new Error( ' not OK ' );

04 }

Which assertion accurately tests the above code?
Question 2 Choose 2
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()?
Question 3 Choose 1
static delay = async delay = > {

return new Promise(resolve = > {

setTimeout(resolve, delay);

});

};

static asyncCall = async () = > {

await delay(1000);

console.log(1);

};

console.log(2);

asyncCall();

console.log(3);

Assume delay and asyncCall are in scope as functions.

What is logged to the console?
Question 4 Choose 1
A developer has an isDeg function that takes one argument, pts. They want to schedule the function to run every minute.

What is the correct syntax for scheduling this function?

That's the last free question in Asynchronous Programming

You've seen the free 25% of this topic (4 of 19 questions). Get complete access for every question, explanation and the timed exam simulator.

Unlock all questions

Experience the real exam before you take it

Our timed 2026 Salesforce JavaScript Developer practice test mirrors the format, number of questions and time limit of the official exam.

The #1 challenge isn't just knowing the material, it's managing the clock. The simulation builds your speed and stamina, so you walk in knowing exactly what to expect.

Take Salesforce JavaScript Developer practice exam
  • Build exam stamina: stay focused and accurate for the entire duration.
  • Master time management: learn to pace yourself so you never have to rush.
  • A new test every time: a randomised set from the Salesforce JavaScript Developer - JS-Dev-101 question pool on every attempt.
  • Unlimited attempts: practice until you're 100% confident, not just once.