console.log('1');
async function async1() {
console.log('2');
await console.log('3');
console.log('4');
}
async1();
setTimeout(() => {
console.log('5');
}, 0);
new Promise((resolve, reject) => {
console.log('6');
resolve();
}).then(() => {
console.log('7');
});
console.log('8');
var name = 'window';
var obj = {
name: 'obj',
normal() {
return () => {
console.log('this.name :', this.name);
};
},
arrow: () => {
return function() {
console.log('this.name :', this.name);
};
}
};
var obj1 = {name: 'obj1'};
obj.normal.call(obj1)();
obj.arrow.call(obj1)();