delay in javascrit 2 seconds code example Example: javascript settimeout setTimeout(function(){ alert("Hello"); }, 3000);