Files
  • index.js
index.js
1
2
3
4
5
6
7
const promiseResolve = Promise.resolve('Hello Async');
promiseResolve.then(res => console.log(res));
// Log ra Hello Async

const promiseReject = Promise.reject('Bye bye Async');
promiseReject.catch(error => console.log(error));
// Log ra Bye bye Async 
node v10.15.2 linux/amd64