Skip to content

Instantly share code, notes, and snippets.

@Ibro
Last active January 3, 2018 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ibro/f0e29ec4ce42a0d17e0f0c6ce514b710 to your computer and use it in GitHub Desktop.
Save Ibro/f0e29ec4ce42a0d17e0f0c6ce514b710 to your computer and use it in GitHub Desktop.
JavaScript Promises, road to async/await - https://codingblast.com/javascript-promise-async-await
setTimeout(() => {
console.log('inside of setTimeout()');
}, 0)
console.log('A very long for-loop incoming..');
let sum = 0;
console.time('forLoopTimer');
for(let i = 1; i < 100000; i++) {
sum += i;
}
console.timeEnd('forLoopTimer');
console.log('After the for-loop');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment