As per my knowledge both setTimeout and setInterval are the native function .Then why setTimeout answer is incorrect.
About native function to run code asynchronously in JavaScript
@Tushar_Jain Yes, both the functions are native js functions for the asynchronous code running in js
But as you can see settimeout is not the valid function, it should be setTimeout hence setInterval is correct answer
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.