DEV Community

Discussion on: Print sorted elements of an array using setTimeout

Collapse
 
rjitsu profile image
Rishav Jadon

This ain't a good approach, what if the array has bigger numbers?
Having a sort function inside of the setTimeout is better.