Exercise on Default Arguments

It's time to play with function arguments.

Exercise 1:

Write a function that executes a callback function after a given delay in milliseconds. The default value of delay is one second.

The setTimeout() method can be used to specify the time delay before a function is executed.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.