const p = new Promise((resolve) => resolve(2));
p.then(resp => {
console.log(resp)
});
const p = new Promise(() => resolve(2));
p.then(resp => {
console.log(resp)
});
const p = new Promise(
function (resolve) {
resolve(2)
}
);
// vs
const p = new Promise(
function () {
resolve(2)
}
);
let pr = new Promise(function(){
console.log("Arguments", arguments);
})