function wait(time) {
  return new Promise(function(resolve) {
    setTimeout(resolve, time);
  });
}
/**
 * Wait (aka pause, or sleep) for the given time in milliseconds.
 * @param {number} time Time in milliseconds.
 * @return {Promise} Promise that will resolve after Time in milliseconds
 *     has elapsed.
 */
Wait (aka pause, or sleep) for the given time in milliseconds.
@param {number} time Time in milliseconds.
@return {Promise} Promise that will resolve after Time in milliseconds
has elapsed.
Wait ( aka pause or sleep ) for the given time in milliseconds . @param { number } time Time in milliseconds . @return { Promise } Promise that will resolve after Time in milliseconds has elapsed .
function wait(time) {
  return new Promise(function(resolve) {
    setTimeout(resolve, time);
  });
}
function wait ( time ) { return new Promise ( function ( resolve ) { setTimeout ( resolve , time ) ; } ) ; }
Wait (aka pause, or sleep) for the given time in milliseconds.
Wait ( aka pause or sleep ) for the given time in milliseconds .