Skip to content

Instantly share code, notes, and snippets.

@Horaddrim
Created December 5, 2017 14:53
Show Gist options
  • Select an option

  • Save Horaddrim/4d92e1c72524f96595258e5d19c32e0a to your computer and use it in GitHub Desktop.

Select an option

Save Horaddrim/4d92e1c72524f96595258e5d19c32e0a to your computer and use it in GitHub Desktop.
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