Promises are blocking

Promises are just a notification mechanism and does not relate to non-blocking

by Saksham Malhotra

JavaScript

var prom = new Promise(resolve => {
  setTimeout(function() {
    console.log('hello');
    resolve('yo')
  }, 3000)
});

prom.then(res => console.log(res));

for (let i = 0; i < 1000000; i++) {
  for (let j = 0; j < 100000; j++) {

  }
}
console.log('hi');