This translation is incomplete. Please help translate this article from English

Properti Promise.prototype mewakili prototype untuk kostruktor Promise.

Property attributes of Promise.prototype
Writable no
Enumerable no
Configurable no


Instansi Promise diwariskan dari Promise.prototype. Anda bisa menggunakan objek prototype pada constructor untuk menambahkan properti atau method ke semua instansi Promise.


Mengembalikan fungsi yang membuat instansi prototype. Ini adalah fungsi Promise secara default.


Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled.
Promise.prototype.then(onFulfilled, onRejected)
Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler, or to its original settled value if the promise was not handled (i.e. if the relevant handler onFulfilled or onRejected is undefined).


Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Promise.prototype' in that specification.
Standard Initial definition.
ECMAScript Latest Draft (ECMA-262)
The definition of 'Promise.prototype' in that specification.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
prototypeChrome Full support 32Edge Full support 12Firefox Full support 29IE No support NoOpera Full support 19Safari Full support 8WebView Android Full support 4.4.3Chrome Android Full support 32Firefox Android Full support 29Opera Android Full support YesSafari iOS Full support 8Samsung Internet Android Full support 2.0nodejs Full support 0.12


Full support  
Full support
No support  
No support


See also