Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascipt delay

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

console.log("Hello");
sleep(2000).then(() => { console.log("World!"); });
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #javascipt #delay
ADD COMMENT
Topic
Name
6+2 =