run a function after delay javascript

JavaScript
setTimeout(function() { your_func(); }, 5000);
Source

Also in JavaScript: