Skip to content

Instantly share code, notes, and snippets.

View gist:81779
/*
Array.each_asynchronously
Description:
Works just like Array.each except runs each iteration on a specified delay.
This means that script execution will continue in between each iteration,
rather than halting until the full array has been processed.
Arguments:
- fn: (function) The function to execute on each item in the array. It is