Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sleep js

const sleep = ms => new Promise(r => setTimeout(r, ms));
sleep(5000)

OR

> npm i sleepjs

const { sleep } = require('sleepjs')
await sleep(500)
Source by stickynotepickles.herokuapp.com #
 
PREVIOUS NEXT
Tagged: #sleep #js
ADD COMMENT
Topic
Name
8+6 =