{"id":12261,"date":"2022-08-03T12:34:35","date_gmt":"2022-08-03T16:34:35","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12261"},"modified":"2022-08-03T12:34:37","modified_gmt":"2022-08-03T16:34:37","slug":"how-to-use-settimeout-function-in-vanilla-javascript","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/how-to-use-settimeout-function-in-vanilla-javascript\/","title":{"rendered":"How to Use setTimeout Function in Vanilla JavaScript"},"content":{"rendered":"\n
Vanilla JavaScript setTimeout<\/code> code snippet to delay a function call.<\/p>\n\n\n\n
setTimeout(function(){\n alert("Hello after 2 seconds"); \n}, 2000); \/\/ wait 2 seconds<\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,27,15,16],"tags":[328,350,433,471,638],"yoast_head":"\n