JS: Promise.prototype

By Xah Lee. Date: . Last updated: .

(new in ECMAScript 2015)

Properties

Promise.prototype.finally
xtodo

new in JS: ECMAScript 2018

Promise.prototype.then
Promise.prototype.catch
Promise.prototype.constructor

value is the promise constructor Promise.

console.assert(Promise.prototype.constructor === Promise);
Promise.prototype [ Symbol.toStringTag ]

value is the string "Promise"

console.assert(Promise.prototype[Symbol.toStringTag] === "Promise");

see JS: Object .prototype .toString