Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const check = () => {
- const arr = [3,2,1]
- arr.forEach(async (val) => {
- await setTimeout(() => console.log(val), val*1000)
- })
- }
- check();
- 1
- 2
- 3
- 3
- 2
- 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement