JavaScript Promise.resolve()
- Previous Page reject()
- Next Page then()
- Go to the Previous Level JavaScript Promise Reference Manual
Definition and Usage
Promise.resolve()
The method returns a resolved Promise object with the specified value as its resolution value.
Example
Promise.resolve("Everything is fine");
Syntax
Promise.resolve(message)
Parameters
Parameters | Description |
---|---|
message | Used as the argument for resolving the value. |
Return Value
Type | Description |
---|---|
Object | New Promise Object |
Browser Support
Promise.resolve()
It is a feature of ECMAScript 6 (ES6).
Since June 2017, ES6 (JavaScript 2015) has been supported in all modern browsers:
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome 51 | Edge 15 | Firefox 54 | Safari 10 | Opera 38 |
May 2016 | April 2017 | June 2017 | September 2016 | June 2016 |
Promise.resolve()
Internet Explorer is not supported.
- Previous Page reject()
- Next Page then()
- Go to the Previous Level JavaScript Promise Reference Manual