Correctly resolve promise
const promise = new Promise(function(resolve) {
console.log('Starting task...');
return 100;
});
promise.then(function(res) {
console.log('Promise fulfilled');
console.log(res);
});
Javascript
Console