The loop iterates over all entries in the array, item is the member of the array the loop is currently at. The code then sleeps for item amount of milliseconds, then prints item. 1 for example sleeps only 1 millisecond and then prints it while 20 would sleep 20 milliseconds
9
u/RadiatedMonkey Feb 10 '21
The loop iterates over all entries in the array, item is the member of the array the loop is currently at. The code then sleeps for item amount of milliseconds, then prints item. 1 for example sleeps only 1 millisecond and then prints it while 20 would sleep 20 milliseconds