How to Sleep and Wait in JavaScript

How to Sleep and Wait in JavaScript