What is the correct syntax to schedule this function?
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");
B . setTimeout (formatName(‘John’, ‘’Doe’), 5000);
C . setTimout(() => { formatName("John’, ‘Doe’) }, 5000);
D . setTimeout (‘formatName’, 5000, ‘John", "Doe’);
Answer: D
Latest JavaScript Developer I Practice Questions with 144 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments