What can be attached to Promise are handlers: then and catch, see same MDN link.
"new Promise(executor) - A function that is passed with the arguments resolve and reject." -- this one is correct. Go and read there - developer.mozilla.org/en-US/docs/W...
Comment deleted
Comment hidden by post author - thread only visible in this permalink
Please stop assuming what people did or did not do.
My line 'A Promise is a special type of Javascript object which indicates the eventual completion or failure of an asynchronous function.' is literally the first line in the same MDN document
Factually incorrect. The first line says
The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.
You rephrased it using a much less precise and confusing language.
which you obviously haven't already
Assumption.
I see you're a fan of reading documents, be it on Dev.to or MDN, incompletely.
Assumption.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Please stop confusing people
"A Promise is a proxy for a value not necessarily known when the promise is created." -- MDN
Much better. Just go and read there - developer.mozilla.org/en-US/docs/W...
WAT?
What can be attached to Promise are handlers:
then
andcatch
, see same MDN link."new Promise(executor) - A function that is passed with the arguments resolve and reject." -- this one is correct. Go and read there - developer.mozilla.org/en-US/docs/W...
Please stop assuming what people did or did not do.
Factually incorrect. The first line says
You rephrased it using a much less precise and confusing language.
Assumption.
Assumption.