Skip to content

Instantly share code, notes, and snippets.

@kejiweixun
kejiweixun / understanding_js_promise.js
Last active Jul 22, 2018
I write these codes to help me understand js promise
View understanding_js_promise.js
let result = 9;
function a(){
console.log(-1)
return new Promise(function(resolve, reject){
console.log(0)
resolve('a');
console.log(1)
});
};