setInterval(fn, delay, arg1, arg2, ...) calls fn every delay ms, passing extra arguments.
To call isDeg every 60 seconds with " cat " :
setInterval(isDeg, 60000, ' cat ' );
Why others are wrong:
A/D: isDeg( ' cat ' ) is called immediately, and its return value is scheduled, not the function.
C: setTimeout runs once after 60 seconds, not repeatedly.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit