How to add a delay in Javascript : <p>I need to add a delay to some JavaScript code without importing anything. How do I do it?</p>

<p>I need this for a unity project I am working on. It's like Minecraft but better and I need to add block break times. I have had a look on other websites but got nothing.</p>

<p>I want the code to wait the delay time before proceeding on to the next task. I am quite new to JavaScript too.</p>
