I'm seeing that apparently promises only take 1 parameter, but when I look at it, I feel like I see 2. Would someone mind trying to explain why it's 1? Here's an example a teacher gave.
function executor(resolve, reject) {
let connection = ndb.connect(ip);
if (connection.ok) {
resolve(connection.socket);
} else {
reject(connection.error);
}
}
new Promise(executor);