immediate promise resolve code example
Example: immediate promise resolve
Promise.resolve().then(() => {
console.log('resolved');
});
console.log('end');
// end
// resolve
Promise.resolve().then(() => {
console.log('resolved');
});
console.log('end');
// end
// resolve