ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 149 - Certified JavaScript Developer I discussion

Report
Export

A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the function to run once after five seconds.

What is the correct syntax to schedule this function?

A.
setTimeout (formatName(), 5000, "John", "BDoe");
Answers
A.
setTimeout (formatName(), 5000, "John", "BDoe");
B.
setTimeout (formatName('John', ''Doe'), 5000);
Answers
B.
setTimeout (formatName('John', ''Doe'), 5000);
C.
setTimout(() => { formatName("John', 'Doe') }, 5000);
Answers
C.
setTimout(() => { formatName("John', 'Doe') }, 5000);
D.
setTimeout ('formatName', 5000, 'John", "Doe');
Answers
D.
setTimeout ('formatName', 5000, 'John", "Doe');
Suggested answer: D
asked 23/09/2024
Carlo Hearne
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first