how to run functions with sleep time without setTimeout in javascript code example Example: javascript sleep settimeout setTimeout(() => { console.log("World!"); }, 2000);