Problem: javascript setTimeout executes function immediately
JavaScript has setTimeout() method which calls a function or evaluates an expression after a specified number of milliseconds. See below code, setTimeout(function(){alert("Hello")}, 3000); Above code will display an alert after 3 seconds. Let's take another example, setTimeout(Func1(), 2000); You must be thinking that "Func1()" will be executed after 2 seconds. No, You are wrong. The […]