1
rated 0 times
[
4]
[
3]
/ answers: 1 / hits: 19383
/ 7 Years ago, thu, september 7, 2017, 12:00:00
I was wondering if there is a way to get the second resolve
value (test2) without returning arrays or JavaScript objects.
function testFunction() {
return new Promise(function(resolve, reject) {
resolve(test1, test2);
});
}
async function run() {
var response = await testFunction();
console.log(response); // test1
}
run();
More From » asynchronous