We can make some delay for our execution on our client.
But in web, we don't have sleep function for making our process delayed.,
But we can overcome this issue with the calculation of starting time with our delaying time.,
Here is the code for delaying our execution (Millisecond is a delaying duration)
Which will work in CSJS and SSJS
var startTime = new Date().getTime(); // get the current time
while (new Date().getTime() < startTime + millisecond)