Promise.resolve()
ES6+Returns a Promise object that is resolved with the given value.
Syntax
Promise.resolve(value)Parameters
value any The value to resolve the promise with
Return Value
Promise
A Promise that is resolved with the given value
Examples
JavaScript
Promise.resolve(42)
.then(value => console.log(value)); Output:
// 42