Q: 12
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 toschedule this function?
Options
Discussion
C vs D, but pretty sure it's C. Option C uses an arrow function for proper argument passing, even if the typo's throwing people off. D is just a string reference, which won't execute the function as expected. Anyone see it differently?
C or D? C is right conceptually since setTimeout needs a function reference, not a direct call, even though there are typos in the option. Really clear question compared to others I’ve seen.
Be respectful. No spam.
Question 12 of 30