Published
- 1 min read
Sort an array using setTimeout function
The solution for this is noted below
Sort an array using setTimeout function
Solution
let arr = [10, 100, 500, 20, 35]
arr.forEach((item) => {
setTimeout(() => console.log(item), item)
})
Try other methods by searching on the site. That is if this doesn’t work