when I learn the concept about Promise, I see the below sample code.
new Promise( (resolve,reject) => { // who pass this two function resolve and reject ??
setTimeout( () => {
resolve("find this paramter function");
}, 5000)
})
" when new a Promise instance, where are the parameters(resolve,reject) from ?? "
The above question bothers me a lot, so I want to understand it. Thanks in advance.