Skip to content

Instantly share code, notes, and snippets.

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