new Promise((resolve, reject) => {
if (ok) { resolve(result) }
else { reject(error) }
})
for asynchronous programming. See: Promises
Comments
new Promise((resolve, reject) => {
if (ok) { resolve(result) }
else { reject(error) }
})
for asynchronous programming. See: Promises