编辑代码

//JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
console.log("Hello JSRUN!   \n\n         - from NodeJS .");

new Promise((res, rej) => {
    res(1)
}).then(res => {
    console.log('res', res)
}, err => {
    console.log('err', err)
})

new Promise((res, rej) => {
    rej(1)
}).then(res => {
    console.log('res', res)
}, err => {
    console.log('err', err)
})

const a = new Promise((fulfilled, rejected) => {
    return fulfilled(111)
})
console.log('a', a)