Recently, when I looked at the principle of promise implementation, I found that there was a special parameter in the promise.all method that I didn't understand.

var p3 = new Promise ((resolve, reject) = > {
setTimeout (resolve, 100, "foo");
});

p3 returns a promise object, and the value taken with the then method is" foo", what is the implementation flow? I hope there are bosses who can popularize science.

Mar.18,2021

does this make sense

var p3 = new Promise((resolve, reject) => {
  setTimeout(() => {
    resolve('foo');
  }, 100);
});

setTimeout can have more than two parameters

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e46cf0-27120.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e46cf0-27120.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?