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