Created
December 5, 2017 14:53
-
-
Save Horaddrim/4d92e1c72524f96595258e5d19c32e0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let length = array.length - 1 | |
| // Simple processing inside | |
| for (let i = length; i >=0; i--){ | |
| console.log(array[i]) | |
| } | |
| // For promises and hard-stuff | |
| let length = array.length - 1 | |
| const promiseArray = [] | |
| for (let i = length; i >=0; i--){ | |
| promiseArray.push(array[i]) | |
| } | |
| // And then wait for then! | |
| await Promise.all(promiseArray) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment