tp钱包官网版app正版|promise
Promise Definition & Meaning - Merriam-Webster
Promise Definition & Meaning - Merriam-Webster
Menu Toggle
Merriam-Webster Logo
Games & Quizzes
Games & Quizzes
Word of the Day
Grammar
Wordplay
Word Finder
Thesaurus
Join MWU
Shop
Books
Merch
Settings
My Words
Recents
Account
Log Out
More
Thesaurus
Join MWU
Shop
Books
Merch
Log In
Username
My Words
Recents
Account
Log Out
Est. 1828
Dictionary
Definition
noun
verb
noun
2
noun
verb
Synonyms
Example Sentences
Word History
Phrases Containing
Entries Near
Cite this EntryCitation
Share
Kids DefinitionKids
Legal DefinitionLegal
More from M-W
Show more
Show more
Citation
Share
Kids
Legal
More from M-W
Save Word
To save this word, you'll need to log in.
Log In
promise
1 of 2
noun
prom·ise
ˈprä-məs
Synonyms of promise
1
a
: a declaration that one will do or refrain from doing something specified
b
: a legally binding declaration that gives the person to whom it is made a right to expect or to claim the performance or forbearance of a specified act
2
: reason to expect something
little promise of relief
especially
: ground for expectation of success, improvement, or excellence
shows considerable promise
3
: something that is promised
promise
2 of 2
verb
promised; promising
transitive verb
1
: to pledge to do, bring about, or provide
promise aid
2
archaic
: warrant, assure
3
chiefly dialectal
: betroth
4
: to suggest beforehand : give promise of
dark clouds promise rain
intransitive verb
1
: to make a promise
2
: to give ground for expectation : be imminent
promisee
ˌprä-mə-ˈsē
noun
promisor
ˌprä-mə-ˈsȯr
noun
or less commonly promiser
ˈprä-mə-sər
Synonyms
Noun
oath
pledge
troth
vow
word
Verb
covenant
pledge
swear
vow
See all Synonyms & Antonyms in Thesaurus
Examples of promise in a Sentence
Noun
She gave me her promise.
She never made a promise that she didn't intend to keep.
There is little promise of relief in the forecast.
They were attracted by the promise of success.
a sunny morning that gives every promise of a fine day
There is a promise of better days ahead.
Verb
Promise me that you won't tell anyone.
I can't promise you that I'll be able to go, but I'll do my best.
The governor promised that the prisoners would receive a fair trial.
She promised to announce the results tomorrow.
International organizations have promised aid.
I promise to be careful.
You always promise, but you never do what you say you will.
“I won't tell anyone.” “Promise?” “Yes, I promise.”
Those gray skies promise rain.
See More
Recent Examples on the WebNoun
Harness the promise of A.I. and protect us from its peril.
—USA TODAY, 8 Mar. 2024
But the promise of amyloid-targeting drugs remains divisive within the field.
—David Ovalle, Washington Post, 8 Mar. 2024
All four players arrived to great fanfare but have largely been disappointing, though Mara has shown some promise on offense in recent weeks.
—Ben Bolch, Los Angeles Times, 8 Mar. 2024
The promise of a new season gives us the perfect excuse for a wardrobe overhaul — which means saying goodbye to puffy coats and sweaters in favor of light, airy blouses.
—Jamie Allison Sanders, Peoplemag, 7 Mar. 2024
Ophelia’s narrative begins with the blossoming of a secret romance with Hamlet, filled with promise and youthful passion.
—David Catlin, The Enquirer, 6 Mar. 2024
In the March 1987 issue of Popular Science, writer Jim Schefter tested the device with its big futuristic promises and hours-long setup time.
—Popular Science, 6 Mar. 2024
The 2006 film delivered on its promise, winning Best Picture and, finally, scoring Scorsese his first Best Director trophy.
—Derek Lawrence, EW.com, 5 Mar. 2024
The United States – a top destination for Haitian migrants fleeing the country’s turmoil – has also eagerly backed the mission with a promise of $200 million.
—Caitlin Stephen Hu, CNN, 4 Mar. 2024
Verb
Crafted from sustainable materials and built for longevity, this set promises a stylish and comfortable playtime.
—Samantha McIntyre, Parents, 9 Mar. 2024
In a bid to compete with similar membership programs like Walmart+ and Amazon Prime, Target Circle 360—which will cost customers $99 per year—promises free two-day shipping on online orders and unlimited same-day delivery under an hour on orders over $35.
—Sasha Rogelberg, Fortune, 8 Mar. 2024
Rivian promises a full refund for customers who change their mind.
—Francisco Velasquez, Quartz, 8 Mar. 2024
Your double promised enough strength to respond with heart length plus clubs or diamond support.
—Frank Stewart, The Mercury News, 8 Mar. 2024
Grass seed that’s promised to patch bare spots usually won’t.
—Neil Sperry, Fort Worth Star-Telegram, 8 Mar. 2024
This could prove promising: Europe has close to 20 start-ups developing micro-launchers and most have plans for larger rockets.
—Jean-François Morizur, Fortune Europe, 8 Mar. 2024
Even though venture capital deals have slowed, life science companies like Boundless that promise clinical data within months — not years — are getting attention from investors.
—Natallie Rocha, San Diego Union-Tribune, 7 Mar. 2024
This had never been done before—with any disease—but the nonprofit Cystic Fibrosis Foundation deemed the strategy promising enough to strike an unusual venture-philanthropy agreement with a company that would attempt it, which was eventually bought by Vertex Pharmaceuticals.
—Sarah Zhang, The Atlantic, 7 Mar. 2024
See More
These examples are programmatically compiled from various online sources to illustrate current usage of the word 'promise.' Any opinions expressed in the examples do not represent those of Merriam-Webster or its editors. Send us feedback about these examples.
Word History
Etymology
Noun
Middle English promis, from Latin promissum, from neuter of promissus, past participle of promittere to send forth, promise, from pro- forth + mittere to send
First Known Use
Noun
15th century, in the meaning defined at sense 1a Verb
15th century, in the meaning defined at transitive sense 1
Time Traveler
The first known use of promise was
in the 15th century
See more words from the same century
Phrases Containing promise
a lick and a promise
break one's promise
go back on one's promise
keep/fulfill one's promise
hold/have promise
I (can) promise you
make a promise
promise (someone) the stars/moon/earth/world
show (a lot of) promise
breach of promise
full of promise
lick and a promise
Dictionary Entries Near promise
promiscuous
promise
promised land
See More Nearby Entries
Cite this Entry
Style
MLA
Chicago
APA
Merriam-Webster
“Promise.” Merriam-Webster.com Dictionary, Merriam-Webster, https://www.merriam-webster.com/dictionary/promise. Accessed 12 Mar. 2024.
Copy Citation
Share
Post the Definition of promise to Facebook
Share the Definition of promise on Twitter
Kids Definition
promise
1 of 2
noun
prom·ise
ˈpräm-əs
1
: a statement by a person that he or she will or will not do something
a promise to pay within a month
2
: something promised
3
: a cause or ground for hope
give promise of success shows promise
promise
2 of 2
verb
promised; promising
1
: to give a promise about one's own actions
I promise to clean my room this afternoon
2
: to give reason to expect
dark clouds promising rain
promisor
ˌpräm-ə-ˈsȯ(ə)r
noun
Etymology
Noun
Middle English promisse, promis "promise," derived from Latin promissus, past participle of promittere "to send forth, promise," from pro- "forward, forth" and mittere "to send, throw" — related to message
Legal Definition
promise
noun
prom·ise
: a declaration or manifestation especially in a contract of an intention to act or refrain from acting in a specified way that gives the party to whom it is made a right to expect its fulfillment
—
aleatory promise
: a promise (as to compensate an insured individual for future loss) whose fulfillment is dependent on a fortuitous or uncertain event
—
collateral promise
: a promise usually to pay the debt of another that is ancillary to an original promise, is not made for the benefit of the party making it, and must be in writing to be enforceable
—
false promise
: a promise that is made with no intention of carrying it out and especially with intent to deceive or defraud
—
gratuitous promise
: a promise that is made without consideration and is usually unenforceable
called also
naked promise
compare nudum pactum
Note:
A gratuitous promise may be enforceable under promissory estoppel.
—
illusory promise
: a purported promise that does not actually bind the party making it to a particular performance
an illusory promise depending solely on the will of the supposed promisor
—
implied promise
: a promise that is considered to exist despite the lack of an agreement or express terms to that effect and the breach of which may be recognized as a cause of action
claimed a breach of an implied promise that he would not be terminated at will
see also promise implied in fact and promise implied in law in this entry
—
naked promise
: gratuitous promise in this entry
—
original promise
: a promise (as in a suretyship) usually to pay the debt of another that is made primarily for the benefit of the party making it and need not be in writing to be enforceable compare collateral promise in this entry, main purpose rule
—
promise implied in fact
: an implied promise that exists by inference from specific facts, circumstances, or acts of the parties
—
promise implied in law
: an implied promise that exists on the basis of a legally enforceable duty and not on the basis of words or conduct which are promissory in form or support an inference of a promise
a promise implied in law that one will be compensated for services rendered and accepted
More from Merriam-Webster on promise
Nglish: Translation of promise for Spanish Speakers
Britannica English: Translation of promise for Arabic Speakers
Last Updated:
11 Mar 2024
- Updated example sentences
Love words? Need even more definitions?
Subscribe to America's largest dictionary and get thousands more definitions and advanced search—ad free!
Merriam-Webster unabridged
Can you solve 4 words at once?
Play
Play
Can you solve 4 words at once?
Play
Play
Word of the Day
ulterior
See Definitions and Examples »
Get Word of the Day daily email!
Popular in Grammar & Usage
See All
8 Grammar Terms You Used to Know, But Forgot
Homophones, Homographs, and Homonyms
Your vs. You're: How to Use Them Correctly
Every Letter Is Silent, Sometimes: A-Z List of Examples
More Commonly Mispronounced Words
See All
Popular in Wordplay
See All
'Arsy-Varsy,' and Other Snappy Reduplicatives
The Words of the Week - Mar. 8
10 Scrabble Words Without Any Vowels
12 More Bird Names that Sound Like Insults (and Sometimes Are)
8 Uncommon Words Related to Love
See All
Games & Quizzes
See All
Quordle
Can you solve 4 words at once?
Play
Blossom Word Game
You can make only 12 words. Pick the best ones!
Play
Missing Letter
A crossword with a twist
Play
Spelling Bee Quiz
Can you outdo past winners of the National Spelli...
Take the quiz
Merriam Webster
Learn a new word every day. Delivered to your inbox!
Help
About Us
Advertising Info
Contact Us
Diversity
Privacy Policy
Terms of Use
YouTube
© 2024 Merriam-Webster, Incorporated
PROMISE | English meaning - Cambridge Dictionary
PROMISE | English meaning - Cambridge Dictionary
Dictionary
Translate
Grammar
Thesaurus
+Plus
Cambridge Dictionary +Plus
Shop
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Log in
/
Sign up
English (UK)
Search
Search
English
Meaning of promise in English
promiseverb uk
Your browser doesn't support HTML5 audio
/ˈprɒm.ɪs/ us
Your browser doesn't support HTML5 audio
/ˈprɑː.mɪs/
promise verb
(SAY CERTAINLY)
Add to word list
Add to word list
B1 [ I or T ] to tell someone that you will certainly do something: [ + to infinitive ] He promised faithfully to call me every week. [ + that ] The government have promised that they'll reduce taxes. [ + (that) ] Promise me (that) you won't tell him. I'll look for some while I'm at the shops but I'm not promising anything. Can I have that book back when you've finished because I've promised it (= I have said I will give it) to Sara. [ + two objects ] Her parents promised her a new car if she passed her exams. I've promised myself a long bath when I get through all this work. [ + speech ] "I'll come round and see you every day," she promised. "I won't do anything dangerous." "You promise?" "I promise." "I won't have time to take you shopping this afternoon." "But you promised!"
Thesaurus: synonyms, antonyms, and examples
to promise someone somethingpromiseI promise that I'll be home before dark.guaranteeI can't guarantee that the operation will be successful.give (someone) your wordHe gave me his word that the job would be finished on time.assure"Don't worry, your car will be ready tomorrow", the mechanic assured him.swearI didn't know what happened, I swear.pledgeWe are asking people to pledge their support for our campaign.
See more results »
More examplesFewer examples"But listen, you must promise never to tell anyone." "I promise."You have to stand up in court and promise to tell 'the truth, the whole truth and nothing but the truth'.I gave him my number and he promised to call me.I promised the babysitter that we'd be home by midnight.She's been promising to pay back the money for six months, but I reckon she's just stringing me along.
SMART Vocabulary: related words and phrases
Making & breaking promises & commitments
assurance
be on your honour idiom
breach of contract
commit someone to something
commitment
committed
cross my heart (and hope to die) idiom
deliver on something
fink
fink out
oath
pact
pledge
promises, promises! idiom
promisor
promissory
repledge
restrictive covenant
sworn
vow
See more results »
promise verb
(BE EXPECTED)
promise to be good, exciting, etc.
B2 If something promises to be good, exciting, etc. it is expected to be good, exciting, etc.: It promises to be a really exciting game.
SMART Vocabulary: related words and phrases
Planning, expecting and arranging
accidentally
accidentally on purpose idiom
advertent
advisedly
aim at something
conscious
cue
game something out
game-fixing
hatch
have something in mind idiom
have something up your sleeve idiom
horizon scanning
muster
pencil
provide
provide against something
provide for someone
provident
providently
See more results »
Grammar
PromisePromise is a noun and a verb. …
Idiom
promise someone the earth/moon
promisenoun uk
Your browser doesn't support HTML5 audio
/ˈprɒm.ɪs/ us
Your browser doesn't support HTML5 audio
/ˈprɑː.mɪs/
promise noun
(SAY CERTAINLY)
B1 [ C ] the act of saying that you will certainly do something: I'll put my things away tonight - and that's a promise! I'll try to get back in time, but I'm not making any promises.
keep/break a promise
B2 to do/not do what you said that you would do: If I make a promise, I like to keep it.
Synonyms
assurance (PROMISE)
bond (PROMISE)
commitment
guarantee
oath (PROMISE)
pledge
undertaking (PROMISE) formal
vow
word (PROMISE)
More examplesFewer examplesShe felt encouraged by their promise of support.I made a promise to you and I intend to keep it.Voters are bound to be mistrustful of a government that has broken so many promises.The prime minister may now be regretting her impetuous promise to reduce unemployment by half.The company has not kept faith with its promise to invest in training.
SMART Vocabulary: related words and phrases
Making & breaking promises & commitments
assurance
be on your honour idiom
breach of contract
commit someone to something
commitment
committed
cross my heart (and hope to die) idiom
deliver on something
fink
fink out
oath
pact
pledge
promises, promises! idiom
promisor
promissory
repledge
restrictive covenant
sworn
vow
See more results »
promise noun
(EXPECTED)
[ U ] the idea that someone or something is likely to develop successfully and that people expect this to happen: His English teacher had written on his report that he showed great promise. As a child I was quite a good dancer, but I didn't fulfil my early promise.
SMART Vocabulary: related words and phrases
Potential
accident
an accident waiting to happen idiom
auspicious
auspiciously
be an actor, cook, etc. in the making idiom
embryo
fertile
making
not be beyond the wit of man/someone idiom
potential
potentiality
potentially
prospect
realizable
retrievable
room
room for improvement idiom
sleeper
unmined
wit
See more results »
Grammar
PromisePromise is a noun and a verb. …
Idiom
promises, promises!
(Definition of promise from the Cambridge Advanced Learner's Dictionary & Thesaurus © Cambridge University Press)
promise | American Dictionary
promiseverb us
Your browser doesn't support HTML5 audio
/ˈprɑm·ɪs/
promise verb
(STATE CONFIDENTLY)
Add to word list
Add to word list
[ I/T ] to state to someone that you will certainly do something: [ T ] We promised the kids (that) we’d take them to the zoo. [ + to infinitive ] She promised to be careful.
promise verb
(HAVE LIKELY SUCCESS)
to seem likely: [ + to infinitive ] The new movie promises to be one of the biggest money-makers of all time.
promisenoun us
Your browser doesn't support HTML5 audio
/ˈprɑm·ɪs/
promise noun
(LIKELY SUCCESS)
[ U ] the likelihood of success or achievement: She shows great promise as a fiction writer.
promise noun
(CONFIDENT STATEMENT)
[ C ] a statement that you will certainly do something: I’ll try to get back in time, but I’m not making any promises. He broke his promise to (= said he would but did not) give his art collection to the county museum.
(Definition of promise from the Cambridge Academic Content Dictionary © Cambridge University Press)
Examples of promise
promise
Instead, it exhilarates them with illusions and promises, which can intoxicate but cannot produce results.
From the Cambridge English Corpus
He immediately gave himself up and promised to name his accomplices and own up to all his crimes if pardoned.
From the Cambridge English Corpus
Patterns of butterfly diversity and promising topics in natural history and ecology.
From the Cambridge English Corpus
The analogy suggests that speculation makes a claim, promises something to the community, while contributing nothing at all to other scientists.
From the Cambridge English Corpus
Both the process of legislative bargaining and its nation-building object promised to slowly forge a nonzero sum game out of economic rivalry.
From the Cambridge English Corpus
The most recent systematic review (4), carried out by an orthopedist, supports these (very promising) findings.
From the Cambridge English Corpus
Agencies need to match users' expectations by producing what they have promised.
From the Cambridge English Corpus
We suggest that considerations of host sociality and intraspecific interactions represent promising lines of inquiry.
From the Cambridge English Corpus
However, since it cannot make any metaphysical promises to its adherents, one would expect that not everybody is "born" to live it.
From the Cambridge English Corpus
Now it promised to become a tool for fractionating the cytoplasm of normal cells.
From the Cambridge English Corpus
However, this does not mean the novel endorses the manuals' promises.
From the Cambridge English Corpus
I indicate how it promises to help alleviate some difficulties facing modern practical ethics.
From the Cambridge English Corpus
The difficulty, therefore, is that an inability to access the economic welfare and security that social citizenship promises inhibits any prospect of real inclusion.
From the Cambridge English Corpus
A usurper is climbing the steps to the throne, and he promises changes.
From the Cambridge English Corpus
To some the year 1918 promised defeat ; certainly there seemed little prospect of the war's end.
From the Cambridge English Corpus
See all examples of promise
These examples are from corpora and from sources on the web. Any opinions in the examples do not represent the opinion of the Cambridge Dictionary editors or of Cambridge University Press or its licensors.
Collocations with promise
promise
These are words often used in combination with promise.Click on a collocation to see more examples of it.
breach of promiseThe central concept is breach of promise in marriage or marriage situations - and all the subsidary information leads into that.
From the Cambridge English Corpus
broken promiseOn the other hand, the fault for a broken promise may lie with some unforeseen event beyond the promiser's control.
From the Cambridge English Corpus
campaign promiseHe made a campaign promise to work to abolish the office for which he was running.
From the Cambridge English Corpus
These examples are from corpora and from sources on the web. Any opinions in the examples do not represent the opinion of the Cambridge Dictionary editors or of Cambridge University Press or its licensors.
See all collocations with promise
What is the pronunciation of promise?
B1,B2,B1,B2
Translations of promise
in Chinese (Traditional)
肯定地說, 允諾,答應, 保證…
See more
in Chinese (Simplified)
肯定地说, 允诺,答应, 保证…
See more
in Spanish
prometer, promesa, promesa [feminine…
See more
in Portuguese
prometer, dar a palavra, promessa…
See more
in more languages
in Marathi
in Japanese
in Turkish
in French
in Catalan
in Dutch
in Tamil
in Hindi
in Gujarati
in Danish
in Swedish
in Malay
in German
in Norwegian
in Urdu
in Ukrainian
in Russian
in Telugu
in Arabic
in Bengali
in Czech
in Indonesian
in Thai
in Vietnamese
in Polish
in Korean
in Italian
आश्वासन, वचन, शब्द देणे…
See more
(人)に~を約束する, 保証する, (人)に~を与えることを約束する…
See more
söz vermek, vaatte bulunmak, vaat etmek…
See more
promesse [feminine], promettre, promettre (de)…
See more
prometre, promesa…
See more
beloven, veelbelovend zijn, belofte…
See more
நீங்கள் நிச்சயமாக ஏதாவது செய்வீர்கள் என்று ஒருவரிடம் கூற, நீங்கள் நிச்சயமாக ஏதாவது செய்வீர்கள் என்று சொல்லும் செயல்…
See more
वादा करना, वादा…
See more
વચન આપવું…
See more
love, løfte, forventning…
See more
lova, förebåda, löfte…
See more
berjanji, menjanjikan, dijangka…
See more
versprechen, Hoffnung erwecken, das Versprechen…
See more
løfte [masculine], utsikt [masculine], talent [neuter]…
See more
وعدہ کرنا, عہد کرنا, وعدہ…
See more
обіцяти, обіцянка, перспектива…
See more
обещать, обещание…
See more
మీరు ఖచ్చితంగా ఏదైనా చేస్తారని ఎవరికైనా చెప్పు, వాగ్దానం/ మీరు ఖచ్చితంగా ఏదైనా చేస్తారని చెప్పే చర్య…
See more
يَعِد, وَعْد…
See more
প্রতিজ্ঞা করা, অঙ্গীকার, প্রতিশ্রুতি…
See more
slíbit, slibovat, slib…
See more
berjanji, menjanjikan, menjanjikan harapan…
See more
สัญญา, มีเค้า, ส่อแวว…
See more
hứa, đảm bảo, báo hiệu…
See more
obiecywać, przyrzekać, obietnica…
See more
약속하다, 약속…
See more
promettere, promessa…
See more
Need a translator?
Get a quick, free translation!
Translator tool
Browse
prominently
promiscuity
promiscuous
promiscuously
promise
promise someone the earth/moon idiom
promised
Promised Land
promisee
More meanings of promise
All
pinky promise
out-promise, at outpromise
pinky promise, at pinky swear
pinkie promise, at pinky promise
holds promise
keep your promise/word phrase
promise someone the earth/moon idiom
See all meanings
Idioms and phrases
keep your promise/word phrase
promise someone the earth/moon idiom
a lick and a promise idiom
solemn promise, commitment, undertaking, etc. phrase
See all idioms and phrases
Word of the Day
response
UK
Your browser doesn't support HTML5 audio
/rɪˈspɒns/
US
Your browser doesn't support HTML5 audio
/rɪˈspɑːns/
an answer or reaction
About this
Blog
Forget doing it or forget to do it? Avoiding common mistakes with verb patterns (2)
March 06, 2024
Read More
New Words
inverse vaccine
March 11, 2024
More new words
has been added to list
To top
Contents
EnglishAmericanExamplesCollocationsTranslations
© Cambridge University Press & Assessment 2024
Learn
Learn
Learn
New Words
Help
In Print
Word of the Year 2021
Word of the Year 2022
Word of the Year 2023
Develop
Develop
Develop
Dictionary API
Double-Click Lookup
Search Widgets
License Data
About
About
About
Accessibility
Cambridge English
Cambridge University Press & Assessment
Consent Management
Cookies and Privacy
Corpus
Terms of Use
© Cambridge University Press & Assessment 2024
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Dictionary
Definitions
Clear explanations of natural written and spoken English
English
Learner’s Dictionary
Essential British English
Essential American English
Translations
Click on the arrows to change the translation direction.
Bilingual Dictionaries
English–Chinese (Simplified)
Chinese (Simplified)–English
English–Chinese (Traditional)
Chinese (Traditional)–English
English–Dutch
Dutch–English
English–French
French–English
English–German
German–English
English–Indonesian
Indonesian–English
English–Italian
Italian–English
English–Japanese
Japanese–English
English–Norwegian
Norwegian–English
English–Polish
Polish–English
English–Portuguese
Portuguese–English
English–Spanish
Spanish–English
English–Swedish
Swedish–English
Semi-bilingual Dictionaries
English–Arabic
English–Bengali
English–Catalan
English–Czech
English–Danish
English–Gujarati
English–Hindi
English–Korean
English–Malay
English–Marathi
English–Russian
English–Tamil
English–Telugu
English–Thai
English–Turkish
English–Ukrainian
English–Urdu
English–Vietnamese
Translate
Grammar
Thesaurus
Pronunciation
Cambridge Dictionary +Plus
Shop
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Log in /
Sign up
English (UK)
Change
English (UK)
English (US)
Español
Русский
Português
Deutsch
Français
Italiano
中文 (简体)
正體中文 (繁體)
Polski
한국어
Türkçe
日本語
Tiếng Việt
Nederlands
Svenska
Dansk
Norsk
हिंदी
বাঙ্গালি
मराठी
ગુજરાતી
தமிழ்
తెలుగు
Українська
Follow us
Choose a dictionary
Recent and Recommended
Definitions
Clear explanations of natural written and spoken English
English
Learner’s Dictionary
Essential British English
Essential American English
Grammar and thesaurus
Usage explanations of natural written and spoken English
Grammar
Thesaurus
Pronunciation
British and American pronunciations with audio
English Pronunciation
Translation
Click on the arrows to change the translation direction.
Bilingual Dictionaries
English–Chinese (Simplified)
Chinese (Simplified)–English
English–Chinese (Traditional)
Chinese (Traditional)–English
English–Dutch
Dutch–English
English–French
French–English
English–German
German–English
English–Indonesian
Indonesian–English
English–Italian
Italian–English
English–Japanese
Japanese–English
English–Norwegian
Norwegian–English
English–Polish
Polish–English
English–Portuguese
Portuguese–English
English–Spanish
Spanish–English
English–Swedish
Swedish–English
Semi-bilingual Dictionaries
English–Arabic
English–Bengali
English–Catalan
English–Czech
English–Danish
English–Gujarati
English–Hindi
English–Korean
English–Malay
English–Marathi
English–Russian
English–Tamil
English–Telugu
English–Thai
English–Turkish
English–Ukrainian
English–Urdu
English–Vietnamese
Dictionary +Plus
Word Lists
Choose your language
English (UK)
English (US)
Español
Русский
Português
Deutsch
Français
Italiano
中文 (简体)
正體中文 (繁體)
Polski
한국어
Türkçe
日本語
Tiếng Việt
Nederlands
Svenska
Dansk
Norsk
हिंदी
বাঙ্গালি
मराठी
ગુજરાતી
தமிழ்
తెలుగు
Українська
Contents
English
Verb
promise (SAY CERTAINLY)
promise (BE EXPECTED)
promise to be good, exciting, etc.
Noun
promise (SAY CERTAINLY)
keep/break a promise
promise (EXPECTED)
American
Verb
promise (STATE CONFIDENTLY)
promise (HAVE LIKELY SUCCESS)
Noun
promise (LIKELY SUCCESS)
promise (CONFIDENT STATEMENT)
Examples
Collocations
Translations
Grammar
All translations
My word lists
Add promise to one of your lists below, or create a new one.
More
Go to your word lists
Tell us about this example sentence:
The word in the example sentence does not match the entry word.
The sentence contains offensive content.
Cancel
Submit
The word in the example sentence does not match the entry word.
The sentence contains offensive content.
Cancel
Submit
Promise - JavaScript | MDN
ise - JavaScript | MDNSkip to main contentSkip to searchSkip to select languageMDN Web DocsOpen main menuReferencesReferencesOverview / Web TechnologyWeb technology reference for developersHTMLStructure of content on the webCSSCode used to describe document styleJavaScriptGeneral-purpose scripting languageHTTPProtocol for transmitting web resourcesWeb APIsInterfaces for building web applicationsWeb ExtensionsDeveloping extensions for web browsersWeb TechnologyWeb technology reference for developersGuidesGuidesOverview / MDN Learning AreaLearn web developmentMDN Learning AreaLearn web developmentHTMLLearn to structure web content with HTMLCSSLearn to style content using CSSJavaScriptLearn to run scripts in the browserAccessibilityLearn to make the web accessible to allPlusPlusOverviewA customized MDN experienceAI Help (beta)Get real-time assistance and supportUpdatesAll browser compatibility updates at a glanceDocumentationLearn how to use MDN PlusFAQFrequently asked questions about MDN PlusCurriculumNewBlogPlayAI Help BetaSearch MDNClear search inputSearchThemeLog inSign up for freeReferencesJavaScriptReferenceStandard built-in objectsPromiseArticle ActionsEnglish (US)Filter sidebarClear filter inputIn this articleDescriptionConstructorStatic propertiesStatic methodsInstance propertiesInstance methodsExamplesSpecificationsBrowser compatibilitySee alsoStandard built-in objectsPromiseConstructorPromise() constructorPropertiesPromise[@@species]MethodsPromise.all()Promise.allSettled()Promise.any()Promise.prototype.catch()Promise.prototype.finally()Promise.race()Promise.reject()Promise.resolve()Promise.prototype.then()Promise.withResolvers()InheritanceFunctionConstructorFunction() constructorPropertiesFunction.prototype.argumentsNon-standard
Deprecated
Function.prototype.caller
Non-standard
Deprecated
Function: displayName
Non-standard
Function: lengthFunction: nameFunction: prototypeMethodsFunction.prototype[@@hasInstance]()Function.prototype.apply()Function.prototype.bind()Function.prototype.call()Function.prototype.toString()ObjectPropertiesObject.prototype.constructorObject.prototype.__proto__
Deprecated
MethodsObject.prototype.__defineGetter__()
Deprecated
Object.prototype.__defineSetter__()
Deprecated
Object.prototype.__lookupGetter__()
Deprecated
Object.prototype.__lookupSetter__()
Deprecated
Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()In this articleDescriptionConstructorStatic propertiesStatic methodsInstance propertiesInstance methodsExamplesSpecificationsBrowser compatibilitySee alsoPromiseThe Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
To learn about the way promises work and how you can use them, we advise you to read Using promises first.DescriptionA Promise is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action's eventual success value or failure reason. This lets asynchronous methods return values like synchronous methods: instead of immediately returning the final value, the asynchronous method returns a promise to supply the value at some point in the future.
A Promise is in one of these states:
pending: initial state, neither fulfilled nor rejected.
fulfilled: meaning that the operation was completed successfully.
rejected: meaning that the operation failed.
The eventual state of a pending promise can either be fulfilled with a value or rejected with a reason (error).
When either of these options occur, the associated handlers queued up by a promise's then method are called. If the promise has already been fulfilled or rejected when a corresponding handler is attached, the handler will be called, so there is no race condition between an asynchronous operation completing and its handlers being attached.
A promise is said to be settled if it is either fulfilled or rejected, but not pending.
You will also hear the term resolved used with promises — this means that the promise is settled or "locked-in" to match the eventual state of another promise, and further resolving or rejecting it has no effect. The States and fates document from the original Promise proposal contains more details about promise terminology. Colloquially, "resolved" promises are often equivalent to "fulfilled" promises, but as illustrated in "States and fates", resolved promises can be pending or rejected as well. For example:
jsnew Promise((resolveOuter) => {
resolveOuter(
new Promise((resolveInner) => {
setTimeout(resolveInner, 1000);
}),
);
});
This promise is already resolved at the time when it's created (because the resolveOuter is called synchronously), but it is resolved with another promise, and therefore won't be fulfilled until 1 second later, when the inner promise fulfills. In practice, the "resolution" is often done behind the scenes and not observable, and only its fulfillment or rejection are.
Note: Several other languages have mechanisms for lazy evaluation and deferring a computation, which they also call "promises", e.g. Scheme. Promises in JavaScript represent processes that are already happening, which can be chained with callback functions. If you are looking to lazily evaluate an expression, consider using a function with no arguments e.g. f = () => expression to create the lazily-evaluated expression, and f() to evaluate the expression immediately.
Chained PromisesThe methods Promise.prototype.then(), Promise.prototype.catch(), and Promise.prototype.finally() are used to associate further action with a promise that becomes settled. As these methods return promises, they can be chained.
The .then() method takes up to two arguments; the first argument is a callback function for the fulfilled case of the promise, and the second argument is a callback function for the rejected case. Each .then() returns a newly generated promise object, which can optionally be used for chaining; for example:
jsconst myPromise = new Promise((resolve, reject) => {
setTimeout(() => {
resolve("foo");
}, 300);
});
myPromise
.then(handleFulfilledA, handleRejectedA)
.then(handleFulfilledB, handleRejectedB)
.then(handleFulfilledC, handleRejectedC);
Processing continues to the next link of the chain even when a .then() lacks a callback function. Therefore, a chain can safely omit every rejection callback function until the final .catch().
Handling a rejected promise in each .then() has consequences further down the promise chain. Sometimes there is no choice, because an error must be handled immediately. In such cases we must throw an error of some type to maintain error state down the chain. On the other hand, in the absence of an immediate need, it is simpler to leave out error handling until a final .catch() statement. A .catch() is really just a .then() without a slot for a callback function for the case when the promise is fulfilled.
jsmyPromise
.then(handleFulfilledA)
.then(handleFulfilledB)
.then(handleFulfilledC)
.catch(handleRejectedAny);
Using arrow functions for the callback functions, implementation of the promise chain might look something like this:
jsmyPromise
.then((value) => `${value} and bar`)
.then((value) => `${value} and bar again`)
.then((value) => `${value} and again`)
.then((value) => `${value} and again`)
.then((value) => {
console.log(value);
})
.catch((err) => {
console.error(err);
});
Note: For faster execution, all synchronous actions should preferably be done within one handler, otherwise it would take several ticks to execute all handlers in sequence.
The termination condition of a promise determines the "settled" state of the next promise in the chain. A "fulfilled" state indicates a successful completion of the promise, while a "rejected" state indicates a lack of success. The return value of each fulfilled promise in the chain is passed along to the next .then(), while the reason for rejection is passed along to the next rejection-handler function in the chain.
The promises of a chain are nested in one another, but get popped like the top of a stack. The first promise in the chain is most deeply nested and is the first to pop.
(promise D, (promise C, (promise B, (promise A) ) ) )
When a nextValue is a promise, the effect is a dynamic replacement. The return causes a promise to be popped, but the nextValue promise is pushed into its place. For the nesting shown above, suppose the .then() associated with "promise B" returns a nextValue of "promise X". The resulting nesting would look like this:
(promise D, (promise C, (promise X) ) )
A promise can participate in more than one nesting. For the following code, the transition of promiseA into a "settled" state will cause both instances of .then() to be invoked.
jsconst promiseA = new Promise(myExecutorFunc);
const promiseB = promiseA.then(handleFulfilled1, handleRejected1);
const promiseC = promiseA.then(handleFulfilled2, handleRejected2);
An action can be assigned to an already "settled" promise. In that case, the action (if appropriate) will be performed at the first asynchronous opportunity. Note that promises are guaranteed to be asynchronous. Therefore, an action for an already "settled" promise will occur only after the stack has cleared and a clock-tick has passed. The effect is much like that of setTimeout(action, 0).
jsconst promiseA = new Promise((resolve, reject) => {
resolve(777);
});
// At this point, "promiseA" is already settled.
promiseA.then((val) => console.log("asynchronous logging has val:", val));
console.log("immediate logging");
// produces output in this order:
// immediate logging
// asynchronous logging has val: 777
ThenablesThe JavaScript ecosystem had made multiple Promise implementations long before it became part of the language. Despite being represented differently internally, at the minimum, all Promise-like objects implement the Thenable interface. A thenable implements the .then() method, which is called with two callbacks: one for when the promise is fulfilled, one for when it's rejected. Promises are thenables as well.
To interoperate with the existing Promise implementations, the language allows using thenables in place of promises. For example, Promise.resolve will not only resolve promises, but also trace thenables.
jsconst aThenable = {
then(onFulfilled, onRejected) {
onFulfilled({
// The thenable is fulfilled with another thenable
then(onFulfilled, onRejected) {
onFulfilled(42);
},
});
},
};
Promise.resolve(aThenable); // A promise fulfilled with 42
Promise concurrencyThe Promise class offers four static methods to facilitate async task concurrency:
Promise.all()
Fulfills when all of the promises fulfill; rejects when any of the promises rejects.
Promise.allSettled()
Fulfills when all promises settle.
Promise.any()
Fulfills when any of the promises fulfills; rejects when all of the promises reject.
Promise.race()
Settles when any of the promises settles. In other words, fulfills when any of the promises fulfills; rejects when any of the promises rejects.
All these methods take an iterable of promises (thenables, to be exact) and return a new promise. They all support subclassing, which means they can be called on subclasses of Promise, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the Promise() constructor — accepting a single executor function that can be called with the resolve and reject callbacks as parameters. The subclass must also have a resolve static method that can be called like Promise.resolve() to resolve values to promises.
Note that JavaScript is single-threaded by nature, so at a given instant, only one task will be executing, although control can shift between different promises, making execution of the promises appear concurrent. Parallel execution in JavaScript can only be achieved through worker threads.Constructor
Promise()
Creates a new Promise object. The constructor is primarily used to wrap functions that do not already support promises.
Static properties
Promise[@@species]
Returns the constructor used to construct return values from promise methods.
Static methods
Promise.all()
Takes an iterable of promises as input and returns a single Promise. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises reject, with this first rejection reason.
Promise.allSettled()
Takes an iterable of promises as input and returns a single Promise. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.
Promise.any()
Takes an iterable of promises as input and returns a single Promise. This returned promise fulfills when any of the input's promises fulfill, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an AggregateError containing an array of rejection reasons.
Promise.race()
Takes an iterable of promises as input and returns a single Promise. This returned promise settles with the eventual state of the first promise that settles.
Promise.reject()
Returns a new Promise object that is rejected with the given reason.
Promise.resolve()
Returns a Promise object that is resolved with the given value. If the value is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise, the returned promise will be fulfilled with the value.
Promise.withResolvers()
Returns an object containing a new Promise object and two functions to resolve or reject it, corresponding to the two parameters passed to the executor of the Promise() constructor.
Instance propertiesThese properties are defined on Promise.prototype and shared by all Promise instances.
Promise.prototype.constructor
The constructor function that created the instance object. For Promise instances, the initial value is the Promise constructor.
Promise.prototype[@@toStringTag]
The initial value of the @@toStringTag property is the string "Promise". This property is used in Object.prototype.toString().
Instance methods
Promise.prototype.catch()
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.finally()
Appends a handler to the promise, and returns a new promise that is resolved when the original promise is resolved. The handler is called when the promise is settled, whether fulfilled or rejected.
Promise.prototype.then()
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 not a function).
ExamplesBasic Examplejsconst myFirstPromise = new Promise((resolve, reject) => {
// We call resolve(...) when what we were doing asynchronously was successful, and reject(...) when it failed.
// In this example, we use setTimeout(...) to simulate async code.
// In reality, you will probably be using something like XHR or an HTML API.
setTimeout(() => {
resolve("Success!"); // Yay! Everything went well!
}, 250);
});
myFirstPromise.then((successMessage) => {
// successMessage is whatever we passed in the resolve(...) function above.
// It doesn't have to be a string, but if it is only a succeed message, it probably will be.
console.log(`Yay! ${successMessage}`);
});
Example with diverse situationsThis example shows diverse techniques for using Promise capabilities and diverse situations that can occur. To understand this, start by scrolling to the bottom of the code block, and examine the promise chain. Upon provision of an initial promise, a chain of promises can follow. The chain is composed of .then() calls, and typically (but not necessarily) has a single .catch() at the end, optionally followed by .finally(). In this example, the promise chain is initiated by a custom-written new Promise() construct; but in actual practice, promise chains more typically start with an API function (written by someone else) that returns a promise.
The example function tetheredGetNumber() shows that a promise generator will utilize reject() while setting up an asynchronous call, or within the call-back, or both. The function promiseGetWord() illustrates how an API function might generate and return a promise in a self-contained manner.
Note that the function troubleWithGetNumber() ends with a throw. That is forced because a promise chain goes through all the .then() promises, even after an error, and without the throw, the error would seem "fixed". This is a hassle, and for this reason, it is common to omit onRejected throughout the chain of .then() promises, and just have a single onRejected in the final catch().
This code can be run under NodeJS. Comprehension is enhanced by seeing the errors actually occur. To force more errors, change the threshold values.
js// To experiment with error handling, "threshold" values cause errors randomly
const THRESHOLD_A = 8; // can use zero 0 to guarantee error
function tetheredGetNumber(resolve, reject) {
setTimeout(() => {
const randomInt = Date.now();
const value = randomInt % 10;
if (value < THRESHOLD_A) {
resolve(value);
} else {
reject(`Too large: ${value}`);
}
}, 500);
}
function determineParity(value) {
const isOdd = value % 2 === 1;
return { value, isOdd };
}
function troubleWithGetNumber(reason) {
const err = new Error("Trouble getting number", { cause: reason });
console.error(err);
throw err;
}
function promiseGetWord(parityInfo) {
return new Promise((resolve, reject) => {
const { value, isOdd } = parityInfo;
if (value >= THRESHOLD_A - 1) {
reject(`Still too large: ${value}`);
} else {
parityInfo.wordEvenOdd = isOdd ? "odd" : "even";
resolve(parityInfo);
}
});
}
new Promise(tetheredGetNumber)
.then(determineParity, troubleWithGetNumber)
.then(promiseGetWord)
.then((info) => {
console.log(`Got: ${info.value}, ${info.wordEvenOdd}`);
return info;
})
.catch((reason) => {
if (reason.cause) {
console.error("Had previously handled error");
} else {
console.error(`Trouble with promiseGetWord(): ${reason}`);
}
})
.finally((info) => console.log("All done"));
Advanced ExampleThis small example shows the mechanism of a Promise. The testPromise() method is called each time the
The fulfillment of the promise is logged, via a fulfill callback set using p1.then(). A few logs show how the synchronous part of the method is decoupled from the asynchronous completion of the promise.
By clicking the button several times in a short amount of time, you'll even see the different promises being fulfilled one after another.
HTML
html
JavaScript
js"use strict";
let promiseCount = 0;
function testPromise() {
const thisPromiseCount = ++promiseCount;
const log = document.getElementById("log");
// begin
log.insertAdjacentHTML("beforeend", `${thisPromiseCount}) Started
`);
// We make a new promise: we promise a numeric count of this promise,
// starting from 1 (after waiting 3s)
const p1 = new Promise((resolve, reject) => {
// The executor function is called with the ability
// to resolve or reject the promise
log.insertAdjacentHTML(
"beforeend",
`${thisPromiseCount}) Promise constructor
`,
);
// This is only an example to create asynchronism
setTimeout(
() => {
// We fulfill the promise
resolve(thisPromiseCount);
},
Math.random() * 2000 + 1000,
);
});
// We define what to do when the promise is resolved with the then() call,
// and what to do when the promise is rejected with the catch() call
p1.then((val) => {
// Log the fulfillment value
log.insertAdjacentHTML("beforeend", `${val}) Promise fulfilled
`);
}).catch((reason) => {
// Log the rejection reason
console.log(`Handle rejected promise (${reason}) here.`);
});
// end
log.insertAdjacentHTML("beforeend", `${thisPromiseCount}) Promise made
`);
}
const btn = document.getElementById("make-promise");
btn.addEventListener("click", testPromise);
ResultLoading an image with XHRAnother simple example using Promise and XMLHttpRequest to load an image is available at the MDN GitHub js-examples repository. You can also see it in action. Each step is commented on and allows you to follow the Promise and XHR architecture closely.Incumbent settings object trackingA settings object is an environment that provides additional information when JavaScript code is running. This includes the realm and module map, as well as HTML specific information such as the origin. The incumbent settings object is tracked in order to ensure that the browser knows which one to use for a given piece of user code.
To better picture this, we can take a closer look at how the realm might be an issue. A realm can be roughly thought of as the global object. What is unique about realms is that they hold all of the necessary information to run JavaScript code. This includes objects like Array and Error. Each settings object has its own "copy" of these and they are not shared. That can cause some unexpected behavior in relation to promises. In order to get around this, we track something called the incumbent settings object. This represents information specific to the context of the user code responsible for a certain function call.
To illustrate this a bit further we can take a look at how an
html
// we have a realm here as well
const bound = frames[0].postMessage.bind(frames[0], "some data", "*");
// bound is a built-in function — there is no user
// code on the stack, so which realm do we use?
setTimeout(bound);
// this still works, because we use the youngest
// realm (the incumbent) on the stack
The same concept applies to promises. If we modify the above example a little bit, we get this:
html
// we have a realm here as well
const bound = frames[0].postMessage.bind(frames[0], "some data", "*");
// bound is a built in function — there is no user
// code on the stack — which realm do we use?
Promise.resolve(undefined).then(bound);
// this still works, because we use the youngest
// realm (the incumbent) on the stack
If we change this so that the
html
const bound = frames[0].postMessage.bind(frames[0], "some data", "*");
Promise.resolve(undefined).then(bound);
html
window.addEventListener(
"message",
(event) => {
document.querySelector("#text").textContent = "hello";
// this code will only run in browsers that track the incumbent settings object
console.log(event);
},
false,
);
In the above example, the inner text of the
Note: Currently, incumbent realm tracking is fully implemented in Firefox, and has partial implementations in Chrome and Safari.
SpecificationsSpecificationECMAScript Language Specification # sec-promise-objectsBrowser compatibilityBCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.See also
Polyfill of Promise in core-js
Using promises guide
Promises/A+ specification
JavaScript Promises: an introduction on web.dev (2013)
Callbacks, Promises, and Coroutines: Asynchronous Programming Patterns in JavaScript slide show by Domenic Denicola (2011)
Help improve MDNWas this page helpful to you?YesNoLearn how to contribute.This page was last modified on Nov 29, 2023 by MDN contributors.View this page on GitHub • Report a problem with this contentMDN logoYour blueprint for a better internet.MDN on MastodonMDN on X (formerly Twitter)MDN on GitHubMDN Blog RSS FeedMDNAboutBlogCareersAdvertise with usSupportProduct helpReport an issueOur communitiesMDN CommunityMDN ForumMDN ChatDevelopersWeb TechnologiesLearn Web DevelopmentMDN PlusHacks BlogMozilla logoWebsite Privacy NoticeCookiesLegalCommunity Participation GuidelinesVisit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.Portions of this content are ©1998–2024 by individual mozilla.org contributors. Content available under a Creative Commons licen
Just a moment...
a moment...Enable JavaScript and cookies to contiJavaScript Promises
JavaScript Promises
Tutorials
Exercises
Certificates
Services
Menu
Search field
×
Log in
Sign Up
★
+1
My W3Schools
Get Certified
Spaces
Set Goal
Get Certified
Spaces
Set Goal
My W3Schools
Tutorials
Exercises
Certificates
Services
Spaces
Get Certified
Set Goal
Logout
×
Tutorials
Tutorials filter input
×
HTML and CSS
Learn
HTML
Tutorial
Reference
Learn
CSS
Tutorial
Reference
Learn
RWD
Tutorial
Learn
Bootstrap
Overview
Learn
W3.CSS
Tutorial
Reference
Learn
Sass
Tutorial
Reference
Learn
Colors
Tutorial
Reference
Learn
Icons
Tutorial
Reference
Learn
SVG
Tutorial
Reference
Learn
Canvas
Tutorial
Reference
Learn
Graphics
Tutorial
Learn
Character Sets
Reference
Learn
How To
Tutorial
Data Analytics
Learn
AI
Tutorial
Learn
Generative AI
Tutorial
Learn
ChatGPT-3.5
Tutorial
Learn
ChatGPT-4
Tutorial
Learn
Google Bard
Tutorial
Learn
Machine Learning
Tutorial
Learn
DSA
Tutorial
Learn
Data Science
Tutorial
Learn
NumPy
Tutorial
Learn
Pandas
Tutorial
Learn
SciPy
Tutorial
Learn
Matplotlib
Tutorial
Learn
Statistics
Tutorial
Learn
Excel
Tutorial
Learn
Google Sheets
Tutorial
Web Building
Create a Website
HOT!
Create a Server
NEW
Where To Start
Web Templates
Web Statistics
Web Certificates
Web Development
Code Editor
Test Your Typing Speed
Play a Code Game
Cyber Security
Accessibility
Join our Newsletter
JavaScript
Learn
JavaScript
Tutorial
Reference
Learn
React
Tutorial
Learn
jQuery
Tutorial
Reference
Learn
Vue
Tutorial
Reference
Learn
AngularJS
Tutorial
Reference
Learn
JSON
Tutorial
Reference
Learn
AJAX
Tutorial
Learn
AppML
Tutorial
Reference
Learn
W3.JS
Tutorial
Reference
Web Building
Create a Website
HOT!
Create a Server
NEW
Where To Start
Web Templates
Web Statistics
Web Certificates
Web Development
Code Editor
Test Your Typing Speed
Play a Code Game
Cyber Security
Accessibility
Join our Newsletter
Backend
Learn
Python
Tutorial
Reference
Learn
SQL
Tutorial
Reference
Learn
MySQL
Tutorial
Reference
Learn
PHP
Tutorial
Reference
Learn
Java
Tutorial
Reference
Learn
C
Tutorial
Learn
C++
Tutorial
Learn
C#
Tutorial
Learn
R
Tutorial
Learn
Kotlin
Tutorial
Learn
Go
Tutorial
Learn
Django
Tutorial
Reference
Learn
PostgreSQL
Tutorial
Learn
TypeScript
Tutorial
Learn
ASP
Tutorial
Reference
Learn
Node.js
Tutorial
Reference
Learn
Raspberry Pi
Tutorial
Learn
Git
Tutorial
Learn
MongoDB
Tutorial
Learn
AWS Cloud
Tutorial
Learn
XML
Tutorial
Reference
Data Analytics
Learn
AI
Tutorial
Learn
Generative AI
Tutorial
Learn
ChatGPT-3.5
Tutorial
Learn
ChatGPT-4
Tutorial
Learn
Google Bard
Tutorial
Learn
Machine Learning
Tutorial
Learn
DSA
Tutorial
Learn
Data Science
Tutorial
Learn
NumPy
Tutorial
Learn
Pandas
Tutorial
Learn
SciPy
Tutorial
Learn
Matplotlib
Tutorial
Learn
Statistics
Tutorial
Learn
Excel
Tutorial
Learn
Google Sheets
Tutorial
Web Building
Create a Website
HOT!
Create a Server
NEW
Where To Start
Web Templates
Web Statistics
Web Certificates
Web Development
Code Editor
Test Your Typing Speed
Play a Code Game
Cyber Security
Accessibility
Join our Newsletter
×
Exercises
Excercises filter input
×
HTML and CSS
HTML
Exercise
Quiz
CSS
Exercise
Quiz
Bootstrap
Exercise
Quiz
Data Analytics
DSA
Exercise
Quiz
NumPy
Exercise
Quiz
Pandas
Exercise
Quiz
SciPy
Exercise
Quiz
Excel
Exercise
What is an Exercise?
What is a Quiz?
JavaScript
JavaScript
Exercise
Quiz
React
Exercise
Quiz
jQuery
Exercise
Quiz
Vue
Exercise
Quiz
Backend
Python
Exercise
Quiz
SQL
Exercise
Quiz
MySQL
Exercise
Quiz
PHP
Exercise
Quiz
Java
Exercise
Quiz
C
Exercise
Quiz
C++
Exercise
Quiz
C#
Exercise
Quiz
R
Exercise
Quiz
Kotlin
Exercise
Quiz
Django
Exercise
Quiz
PostgreSQL
Exercise
Quiz
TypeScript
Exercise
Quiz
Git
Exercise
Quiz
Go
Exercise
MongoDB
Exercise
AWS Cloud
Exercise
Quiz
Data Analytics
DSA
Exercise
Quiz
NumPy
Exercise
Quiz
Pandas
Exercise
Quiz
SciPy
Exercise
Quiz
Excel
Exercise
What is an Exercise?
What is a Quiz?
×
Certificates
Filter field for certifications
×
HTML and CSS
HTML
Certificate
Course
CSS
Certificate
Course
Bootstrap 3
Certificate
Course
Bootstrap 4
Certificate
Course
Bootstrap 5
Certificate
Data Analytics
Data Analytics
Course
NumPy
Certificate
Course
Pandas
Certificate
Course
Excel
Certificate
Social Media
Course
What is a Certificate?
Programs
Full Access
Best Value!
Front End
Certificate
Course
Web Dev.
Certificate
Course
Web App
Certificate
Course
Web Design
Certificate
Course
JavaScript
JavaScript
Certificate
Course
React
Certificate
Course
jQuery
Certificate
Course
Vue
Certificate
Programs
Full Access
Best Value!
Front End
Certificate
Course
Web Dev.
Certificate
Course
Web App
Certificate
Course
Web Design
Certificate
Course
Programs
Full Access
Best Value!
Front End
Certificate
Course
Web Dev.
Certificate
Course
Web App
Certificate
Course
Web Design
Certificate
Course
Backend
Python
Certificate
Course
SQL
Certificate
Course
MySQL
Certificate
PHP
Certificate
Course
Java
Certificate
Course
C
Certificate
C++
Certificate
Course
C#
Certificate
Course
R
Course
Django
Certificate
TypeScript
Certificate
Course
XML
Certificate
Course
Cyber Security
Certificate
Course
Accessibility
Certificate
Course
Python Apps on AWS
Course
AWS Training
Courses
Data Analytics
Data Analytics
Course
NumPy
Course
Pandas
Course
Excel
Certificate
Social Media
Course
What is a Certificate?
×
All Our Services
Services filter input
×
W3Schools offers a wide range of services and products for beginners and professionals,
helping millions of people everyday to learn and master new skills.
Free Tutorials
Enjoy our free tutorials like millions of other internet users since 1999
References
Explore our selection of references covering all popular coding languages
Create a Website
Create your own website with
W3Schools Spaces
- no setup required
Exercises
Test your skills with different exercises
Quizzes
Test yourself with multiple choice questions
Get Certified
Document your knowledge
Log in / Sign Up
Create a
free
W3Schools Account to Improve Your Learning Experience
My Learning
Track your learning progress at W3Schools and collect rewards
Upgrade
Become a PRO user and unlock powerful features (ad-free, hosting, videos,..)
Where To Start
Not sure where you want to start? Follow our guided path
Code Editor (Try it)
With our online code editor, you can edit code and view the result in your browser
Videos
Learn the basics of HTML in a fun and engaging video tutorial
Templates
We have created a bunch of responsive website templates you can use - for free!
Web Hosting
Host your own website, and share it to the world with
W3Schools Spaces
Create a Server
Create your own server using Python, PHP, React.js, Node.js, Java, C#, etc.
How To's
Large collection of code snippets for HTML, CSS and JavaScript
CSS Framework
Build fast and responsive sites using our free
W3.CSS
framework
Browser Statistics
Read long term trends of browser usage
Typing Speed
Test your typing speed
AWS Training
Learn Amazon Web Services
Color Picker
Use our color picker to find different RGB, HEX and HSL colors.
Code Game
W3Schools Coding Game! Help the lynx collect pine cones
Set Goal
Get personalized learning journey based on your current skills and goals
Newsletter
Join our newsletter and get access to exclusive content every month
×
❮
HTML
CSS
JAVASCRIPT
SQL
PYTHON
JAVA
PHP
HOW TO
W3.CSS
C
C++
C#
BOOTSTRAP
REACT
MYSQL
JQUERY
EXCEL
XML
DJANGO
NUMPY
PANDAS
NODEJS
R
TYPESCRIPT
ANGULAR
GIT
POSTGRESQL
MONGODB
ASP
AI
GO
KOTLIN
SASS
VUE
DSA
GEN AI
SCIPY
AWS
CYBERSECURITY
DATA SCIENCE
❯
JS Tutorial
JS HOME
JS Introduction
JS Where To
JS Output
JS Statements
JS Syntax
JS Comments
JS Variables
JS Let
JS Const
JS Operators
JS Arithmetic
JS Assignment
JS Data Types
JS Functions
JS Objects
JS Events
JS Strings
JS String Methods
JS String Search
JS String Templates
JS Numbers
JS BigInt
JS Number Methods
JS Number Properties
JS Arrays
JS Array Methods
JS Array Search
JS Array Sort
JS Array Iteration
JS Array Const
JS Dates
JS Date Formats
JS Date Get Methods
JS Date Set Methods
JS Math
JS Random
JS Booleans
JS Comparisons
JS If Else
JS Switch
JS Loop For
JS Loop For In
JS Loop For Of
JS Loop While
JS Break
JS Iterables
JS Sets
JS Maps
JS Typeof
JS Type Conversion
JS Bitwise
JS RegExp
JS Precedence
JS Errors
JS Scope
JS Hoisting
JS Strict Mode
JS this Keyword
JS Arrow Function
JS Classes
JS Modules
JS JSON
JS Debugging
JS Style Guide
JS Best Practices
JS Mistakes
JS Performance
JS Reserved Words
JS Versions
JS Versions
JS 2009 (ES5)
JS 2015 (ES6)
JS 2016
JS 2017
JS 2018
JS 2019
JS 2020
JS 2021
JS 2022
JS 2023
JS IE / Edge
JS History
JS Objects
Object Definitions
Object Properties
Object Methods
Object Display
Object Accessors
Object Constructors
Object Prototypes
Object Iterables
Object Sets
Object Maps
Object Reference
JS Functions
Function Definitions
Function Parameters
Function Invocation
Function Call
Function Apply
Function Bind
Function Closures
JS Classes
Class Intro
Class Inheritance
Class Static
JS Async
JS Callbacks
JS Asynchronous
JS Promises
JS Async/Await
JS HTML DOM
DOM Intro
DOM Methods
DOM Document
DOM Elements
DOM HTML
DOM Forms
DOM CSS
DOM Animations
DOM Events
DOM Event Listener
DOM Navigation
DOM Nodes
DOM Collections
DOM Node Lists
JS Browser BOM
JS Window
JS Screen
JS Location
JS History
JS Navigator
JS Popup Alert
JS Timing
JS Cookies
JS Web APIs
Web API Intro
Web Forms API
Web History API
Web Storage API
Web Worker API
Web Fetch API
Web Geolocation API
JS AJAX
AJAX Intro
AJAX XMLHttp
AJAX Request
AJAX Response
AJAX XML File
AJAX PHP
AJAX ASP
AJAX Database
AJAX Applications
AJAX Examples
JS JSON
JSON Intro
JSON Syntax
JSON vs XML
JSON Data Types
JSON Parse
JSON Stringify
JSON Objects
JSON Arrays
JSON Server
JSON PHP
JSON HTML
JSON JSONP
JS vs jQuery
jQuery Selectors
jQuery HTML
jQuery CSS
jQuery DOM
JS Graphics
JS Graphics
JS Canvas
JS Plotly
JS Chart.js
JS Google Chart
JS D3.js
JS Examples
JS Examples
JS HTML DOM
JS HTML Input
JS HTML Objects
JS HTML Events
JS Browser
JS Editor
JS Exercises
JS Quiz
JS Website
JS Bootcamp
JS Certificate
JS References
JavaScript Objects
HTML DOM Objects
JavaScript Promises
❮ Previous
Next ❯
"I Promise a Result!"
"Producing code" is code that can take some time
"Consuming code" is code that must wait for the result
A Promise is an Object that links Producing code and Consuming code
JavaScript Promise Object
A Promise contains both the producing code and calls to the consuming code:
Promise Syntax
let myPromise = new Promise(function(myResolve, myReject) {
// "Producing Code" (May take some time)
myResolve(); // when successful
myReject(); // when error
});
// "Consuming Code" (Must wait for a fulfilled Promise)
myPromise.then(
function(value) { /* code if successful */ },
function(error) { /* code if some error */ }
);
When the producing code obtains the result, it should call one of the two callbacks:
WhenCall
SuccessmyResolve(result value)
ErrormyReject(error object)
Promise Object Properties
A JavaScript Promise object can be:
Pending
Fulfilled
Rejected
The Promise object supports two properties: state and result.
While a Promise object is "pending" (working), the result is undefined.
When a Promise object is "fulfilled", the result is a value.
When a Promise object is "rejected", the result is an error object.
myPromise.statemyPromise.result
"pending"undefined
"fulfilled"a result value
"rejected"an error object
You cannot access the Promise properties state and result.
You must use a Promise method to handle promises.
Promise How To
Here is how to use a Promise:
myPromise.then(
function(value) { /* code if successful */ },
function(error) { /* code if some error */ }
);
Promise.then() takes two arguments, a callback for success and another for failure.
Both are optional, so you can add a callback for success or failure only.
Example
function myDisplayer(some) {
document.getElementById("demo").innerHTML = some;}
let myPromise = new Promise(function(myResolve, myReject) {
let x = 0;
// The producing code (this may take some time)
if (x == 0) {
myResolve("OK");
} else {
myReject("Error");
}
});
myPromise.then(
function(value) {myDisplayer(value);},
function(error) {myDisplayer(error);});
Try it Yourself »
JavaScript Promise Examples
To demonstrate the use of promises, we will use the callback examples from the previous chapter:
Waiting for a Timeout
Waiting for a File
Waiting for a Timeout
Example Using Callback
setTimeout(function() { myFunction("I love You !!!"); }, 3000);
function myFunction(value) {
document.getElementById("demo").innerHTML = value;
}
Try it Yourself »
Example Using Promise
let myPromise = new Promise(function(myResolve, myReject) {
setTimeout(function() { myResolve("I love You !!"); }, 3000);});
myPromise.then(function(value) {
document.getElementById("demo").innerHTML = value;
});
Try it Yourself »
Waiting for a file
Example using Callback
function getFile(myCallback) {
let req = new XMLHttpRequest();
req.open('GET', "mycar.html");
req.onload = function() {
if (req.status == 200) {
myCallback(req.responseText);
} else {
myCallback("Error: " + req.status);
}
}
req.send();
}
getFile(myDisplayer);
Try it Yourself »
Example using Promise
let myPromise = new Promise(function(myResolve, myReject) {
let req = new XMLHttpRequest();
req.open('GET', "mycar.htm");
req.onload = function() {
if (req.status == 200) {
myResolve(req.response);
} else {
myReject("File not Found");
}
};
req.send();
});
myPromise.then(
function(value) {myDisplayer(value);},
function(error) {myDisplayer(error);}
);
Try it Yourself »
Browser Support
ECMAScript 2015, also known as ES6, introduced the JavaScript Promise object.
The following table defines the first browser version with full support for Promise objects:
Chrome 33
Edge 12
Firefox 29
Safari 7.1
Opera 20
Feb, 2014
Jul, 2015
Apr, 2014
Sep, 2014
Mar, 2014
❮ Previous
Next ❯
★
+1
W3schools Pathfinder
Track your progress - it's free!
Log in
Sign Up
COLOR PICKER
SPACES
UPGRADE
AD-FREE
NEWSLETTER
GET CERTIFIED
REPORT ERROR
×
Report Error
If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:
help@w3schools.com
Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W3.CSS Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples
Get Certified
HTML Certificate
CSS Certificate
JavaScript Certificate
Front End Certificate
SQL Certificate
Python Certificate
PHP Certificate
jQuery Certificate
Java Certificate
C++ Certificate
C# Certificate
XML Certificate
FORUM
ABOUT
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use,
cookie and privacy policy.
Copyright 1999-2024 by Refsnes Data. All Rights Reserved.
W3Schools is Powered by W3.CSS.
Promise Definition & Meaning | Britannica Dictionary
Promise Definition & Meaning | Britannica Dictionary
The Britannica Dictionary
mobile search
Home
Ask the Editor
Word of the Day
Quizzes
Core Vocabulary
Browse the Dictionary
×
Britannica Homepage
Ask the Editor
Word of the Day
Quizzes
Core Vocabulary
Browse the Dictionary
The Britannica Dictionary
promise
7 ENTRIES FOUND:
promise (noun)
promise (verb)
earth (noun)
lick (noun)
moon (noun)
star (noun)
world (noun)
1
promise
/ˈprɑːməs/
noun
plural
promises
1
promise
/ˈprɑːməs/
noun
plural
promises
Britannica Dictionary definition of PROMISE
1
[count]
:
a statement telling someone that you will definitely do something or that something will definitely happen in the future
I'll be here early tomorrow, and that's a promise. [=I promise that I'll be here early tomorrow]
Do I have your promise that you'll support me? [=do you promise to support me?]
She gave me her promise.
I don't believe his promise of further tax cuts. = I don't believe his promise to cut taxes further.
He made a promise to help her. = He made a promise that he would help her. [=he promised to help her]
He kept/fulfilled his promise. [=he did what he said he would do]
He broke his promise. = He went back on his promise. [=he didn't do what he said he would do]
She never made a promise that she didn't intend to keep.
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
2
[noncount]
:
an indication of future success or improvement
a young artist who shows (a lot of) promise [=who seems talented and likely to do good work in the future]
Her early novels were full of promise. [=were very promising]
The new drug holds/has promise. [=the new drug could be effective or successful]
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
3
:
a reason to expect that something will happen in the future
— + of
[noncount]
There is little promise of relief in the forecast.
They were attracted by the promise of success.
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
[singular]
a sunny morning that gives every promise of a fine day
There is a promise of better days ahead.
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
a lick and a promise
—
see 2lick
2
promise
/ˈprɑːməs/
verb
promises;
promised;
promising
2
promise
/ˈprɑːməs/
verb
promises;
promised;
promising
Britannica Dictionary definition of PROMISE
1
:
to tell someone that you will definitely do something or that something will definitely happen in the future
[+ object]
He promised to buy his son a new bicycle. = He promised his son a new bicycle. = He promised a new bicycle to his son.
Promise me that you won't tell anyone.
I can't promise you that I'll be able to go, but I'll do my best.
The governor promised that the prisoners would receive a fair trial.
She promised to announce the results tomorrow.
International organizations have promised aid.
I promise to be careful.
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
[no object]
You always promise, but you never do what you say you will.
“I won't tell anyone.” “Promise?” “Yes, I promise.”
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
2
[+ object]
somewhat formal
:
to make (something) seem likely
:
to show signs of (something that is likely or expected to happen)
Those gray skies promise rain.
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
◊ Something that promises to be good, exciting, etc., is expected to be good, exciting, etc.
The race promises to be the most exciting of the season.
It promises to be a good game. [=it should be a good game]
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
I (can) promise you
— used to emphasize a statement
He's only concerned about himself, I promise [=assure] you.
I can promise you, you won't be disappointed.
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
promise (someone) the stars/moon/earth/world
:
to promise (someone) that you will do or give something great or wonderful even though it is not possible
He promised her the stars and the moon, but he never even bought her flowers.
Politicians will promise the earth when they're trying to get elected.
[+] more examples
[-] hide examples
[+] Example sentences
[-] Hide examples
ASK THE EDITOR
If I say,"My father was a doctor," does this mean that he is no longer living, or that he changed his career?
See the answer »
QUIZZES
Vocabulary Quiz
Test your word power
Take the Quiz »
Name That Thing
Take our visual quiz
Test Your Knowledge »
WORD OF THE DAY
lethargic
: feeling a lack of energy
Learn More »
About Us & Legal Info
Partner Program
Contact Us
Privacy Notice
Terms of Use
Pronunciation Symbols
Help
© 2024 Encyclopædia Britannica, Inc.
PROMISE | definition in the Cambridge English Dictionary
PROMISE | definition in the Cambridge English Dictionary
Dictionary
Translate
Grammar
Thesaurus
+Plus
Cambridge Dictionary +Plus
Shop
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Log in
/
Sign up
English (US)
Search
Search
English
Meaning of promise in English
promiseverb us
Your browser doesn't support HTML5 audio
/ˈprɑː.mɪs/ uk
Your browser doesn't support HTML5 audio
/ˈprɒm.ɪs/
promise verb
(SAY CERTAINLY)
Add to word list
Add to word list
B1 [ I or T ] to tell someone that you will certainly do something: [ + to infinitive ] He promised faithfully to call me every week. [ + that ] The government has promised that they'll reduce taxes. [ + (that) ] Promise me (that) you won't tell him. I'll look for some while I'm at the mall but I'm not promising anything. Can I have that book back when you've finished because I've promised it (= I have said I will give it) to Sara. [ + two objects ] Her parents promised her a new car if she passed her finals. I've promised myself a long bath when I get through all this work. [ + speech ] "I'll come around and see you every day," she promised. "I won't do anything dangerous." "You promise?" "I promise." "I won't have time to take you shopping this afternoon." "But you promised!"
Thesaurus: synonyms, antonyms, and examples
to promise someone somethingpromiseI promise that I'll be home before dark.guaranteeI can't guarantee that the operation will be successful.give (someone) your wordHe gave me his word that the job would be finished on time.assure"Don't worry, your car will be ready tomorrow," the mechanic assured him.swearI didn't know what happened, I swear.pledgeWe are asking people to pledge their support for our campaign.
See more results »
More examplesFewer examples"But listen, you must promise never to tell anyone." "I promise."You have to stand up in court and promise to tell 'the truth, the whole truth and nothing but the truth'.I gave him my number and he promised to call me.I promised the babysitter that we'd be home by midnight.She's been promising to pay back the money for six months, but I reckon she's just stringing me along.
SMART Vocabulary: related words and phrases
Making & breaking promises & commitments
assurance
be on your honor idiom
betray
breach of contract
commit someone to something
commitment
committed
cross my heart (and hope to die) idiom
deliver on something
fink out
oath
pledge
promise someone the earth/moon idiom
promisee
promises, promises! idiom
promisor
promissory
sworn
vouch
your word is your bond idiom
See more results »
promise verb
(BE EXPECTED)
promise to be good, exciting, etc.
B2 If something promises to be good, exciting, etc. it is expected to be good, exciting, etc.: It promises to be a really exciting game.
SMART Vocabulary: related words and phrases
Planning, expecting and arranging
accidentally
accidentally on purpose idiom
advertent
advisedly
aim at something
bargain
conscious
cue
game something out
hatch
have something in mind idiom
have something up your sleeve idiom
horizon scanning
how are you fixed for something? idiom
pencil
provide against something
provide for someone
provident
providently
purpose
See more results »
Grammar
PromisePromise is a noun and a verb. …
Idiom
promise someone the earth/moon
promisenoun us
Your browser doesn't support HTML5 audio
/ˈprɑː.mɪs/ uk
Your browser doesn't support HTML5 audio
/ˈprɒm.ɪs/
promise noun
(SAY CERTAINLY)
B1 [ C ] the act of saying that you will certainly do something: I'll put my things away tonight - and that's a promise! I'll try to get back in time, but I'm not making any promises.
keep/break a promise
B2 to do/not do what you said that you would do: If I make a promise, I like to keep it.
Synonyms
assurance (PROMISE)
bond (PROMISE)
commitment
guarantee
oath (PROMISE)
pledge
undertaking (PROMISE) formal
vow
word (PROMISE)
More examplesFewer examplesShe felt encouraged by their promise of support.I made a promise to you and I intend to keep it.Voters are bound to be mistrustful of a government that has broken so many promises.The prime minister may now be regretting her impetuous promise to reduce unemployment by half.The company has not kept faith with its promise to invest in training.
SMART Vocabulary: related words and phrases
Making & breaking promises & commitments
assurance
be on your honor idiom
betray
breach of contract
commit someone to something
commitment
committed
cross my heart (and hope to die) idiom
deliver on something
fink out
oath
pledge
promise someone the earth/moon idiom
promisee
promises, promises! idiom
promisor
promissory
sworn
vouch
your word is your bond idiom
See more results »
promise noun
(EXPECTED)
[ U ] the idea that someone or something is likely to develop successfully and that people expect this to happen: His English teacher had written on his report that he showed great promise. As a child I was quite a good dancer, but I didn't fulfill my early promise.
SMART Vocabulary: related words and phrases
Potential
accident
an accident waiting to happen idiom
auspicious
auspiciously
be an actor, cook, etc. in the making idiom
embryo
fertile
making
not be beyond the wit of man/someone idiom
potential
potentiality
potentially
prospect
realizable
retrievable
room
room for improvement idiom
sleeper
unmined
wit
See more results »
Grammar
PromisePromise is a noun and a verb. …
Idiom
promises, promises!
(Definition of promise from the Cambridge Advanced Learner's Dictionary & Thesaurus © Cambridge University Press)
promise | Intermediate English
promiseverb us
Your browser doesn't support HTML5 audio
/ˈprɑm·ɪs/
promise verb
(STATE CONFIDENTLY)
Add to word list
Add to word list
[ I/T ] to state to someone that you will certainly do something: [ T ] We promised the kids (that) we’d take them to the zoo. [ + to infinitive ] She promised to be careful.
promise verb
(HAVE LIKELY SUCCESS)
to seem likely: [ + to infinitive ] The new movie promises to be one of the biggest money-makers of all time.
promisenoun us
Your browser doesn't support HTML5 audio
/ˈprɑm·ɪs/
promise noun
(LIKELY SUCCESS)
[ U ] the likelihood of success or achievement: She shows great promise as a fiction writer.
promise noun
(CONFIDENT STATEMENT)
[ C ] a statement that you will certainly do something: I’ll try to get back in time, but I’m not making any promises. He broke his promise to (= said he would but did not) give his art collection to the county museum.
(Definition of promise from the Cambridge Academic Content Dictionary © Cambridge University Press)
Examples of promise
promise
It will be a success with or without the city's promised resources.
From cleveland.com
And just like that the promise he made to me when i first contacted him was fulfilled.
From CNN
Has he raised taxes on the very people he promised not to raise taxes on?
From Washington Post
The problem is not the market but rather the promise itself.
From TechCrunch
She told them they could move into her home and promised to care for them as if they were her own.
From New York Post
Back then, we had nothing to show the people but our good faith and the promise for tomorrow.
From The Star-Ledger - NJ.com
Is it all another promise set to be broken?
From New York Daily News
After he returned to his country, they promised each other they would do everything they could to meet every three months, she said.
From CNN
But remember the hope and promise of our youth.
From ESPN
But such programs do not carry too much promise.
From Slate Magazine
They didn't care that there was no way he could live up to those promises.
From TIME
It promised to be surprising and fun, but also a little rebellious.
From NPR
They were also clear about things that they can't promise.
From Ars Technica
Except that it promises to be transformational to one person: me.
From Huffington Post
These examples are from corpora and from sources on the web. Any opinions in the examples do not represent the opinion of the Cambridge Dictionary editors or of Cambridge University Press or its licensors.
Collocations with promise
promise
These are words often used in combination with promise. Click on a collocation to see more examples of it.
breach of promiseThe central concept is breach of promise in marriage or marriage situations - and all the subsidary information leads into that.
From the Cambridge English Corpus
broken promiseOn the other hand, the fault for a broken promise may lie with some unforeseen event beyond the promiser's control.
From the Cambridge English Corpus
campaign promiseHe made a campaign promise to work to abolish the office for which he was running.
From the Cambridge English Corpus
These examples are from corpora and from sources on the web. Any opinions in the examples do not represent the opinion of the Cambridge Dictionary editors or of Cambridge University Press or its licensors.
See all collocations with promise
What is the pronunciation of promise?
B1,B2,B1,B2
Translations of promise
in Chinese (Traditional)
肯定地說, 允諾,答應, 保證…
See more
in Chinese (Simplified)
肯定地说, 允诺,答应, 保证…
See more
in Spanish
prometer, promesa, promesa [feminine…
See more
in Portuguese
prometer, dar a palavra, promessa…
See more
in more languages
in Marathi
in Japanese
in Turkish
in French
in Catalan
in Dutch
in Tamil
in Hindi
in Gujarati
in Danish
in Swedish
in Malay
in German
in Norwegian
in Urdu
in Ukrainian
in Russian
in Telugu
in Arabic
in Bengali
in Czech
in Indonesian
in Thai
in Vietnamese
in Polish
in Korean
in Italian
आश्वासन, वचन, शब्द देणे…
See more
(人)に~を約束する, 保証する, (人)に~を与えることを約束する…
See more
söz vermek, vaatte bulunmak, vaat etmek…
See more
promesse [feminine], promettre, promettre (de)…
See more
prometre, promesa…
See more
beloven, veelbelovend zijn, belofte…
See more
நீங்கள் நிச்சயமாக ஏதாவது செய்வீர்கள் என்று ஒருவரிடம் கூற, நீங்கள் நிச்சயமாக ஏதாவது செய்வீர்கள் என்று சொல்லும் செயல்…
See more
वादा करना, वादा…
See more
વચન આપવું…
See more
love, løfte, forventning…
See more
lova, förebåda, löfte…
See more
berjanji, menjanjikan, dijangka…
See more
versprechen, Hoffnung erwecken, das Versprechen…
See more
løfte [masculine], utsikt [masculine], talent [neuter]…
See more
وعدہ کرنا, عہد کرنا, وعدہ…
See more
обіцяти, обіцянка, перспектива…
See more
обещать, обещание…
See more
మీరు ఖచ్చితంగా ఏదైనా చేస్తారని ఎవరికైనా చెప్పు, వాగ్దానం/ మీరు ఖచ్చితంగా ఏదైనా చేస్తారని చెప్పే చర్య…
See more
يَعِد, وَعْد…
See more
প্রতিজ্ঞা করা, অঙ্গীকার, প্রতিশ্রুতি…
See more
slíbit, slibovat, slib…
See more
berjanji, menjanjikan, menjanjikan harapan…
See more
สัญญา, มีเค้า, ส่อแวว…
See more
hứa, đảm bảo, báo hiệu…
See more
obiecywać, przyrzekać, obietnica…
See more
약속하다, 약속…
See more
promettere, promessa…
See more
Need a translator?
Get a quick, free translation!
Translator tool
Browse
prominently
promiscuity
promiscuous
promiscuously
promise
promise someone the earth/moon idiom
promised
Promised Land
promisee
More meanings of promise
All
pinky promise
out-promise, at outpromise
pinky promise, at pinky swear
pinkie promise, at pinky promise
holds promise
keep your promise/word phrase
promise someone the earth/moon idiom
See all meanings
Idioms and phrases
keep your promise/word phrase
promise someone the earth/moon idiom
a lick and a promise idiom
solemn promise, commitment, undertaking, etc. phrase
See all idioms and phrases
Word of the Day
response
UK
Your browser doesn't support HTML5 audio
/rɪˈspɒns/
US
Your browser doesn't support HTML5 audio
/rɪˈspɑːns/
an answer or reaction
About this
Blog
Forget doing it or forget to do it? Avoiding common mistakes with verb patterns (2)
March 06, 2024
Read More
New Words
inverse vaccine
March 11, 2024
More new words
has been added to list
To top
Contents
EnglishIntermediateExamplesCollocationsTranslations
© Cambridge University Press & Assessment 2024
Learn
Learn
Learn
New Words
Help
In Print
Word of the Year 2021
Word of the Year 2022
Word of the Year 2023
Develop
Develop
Develop
Dictionary API
Double-Click Lookup
Search Widgets
License Data
About
About
About
Accessibility
Cambridge English
Cambridge University Press & Assessment
Consent Management
Cookies and Privacy
Corpus
Terms of Use
© Cambridge University Press & Assessment 2024
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Dictionary
Definitions
Clear explanations of natural written and spoken English
English
Learner’s Dictionary
Essential British English
Essential American English
Translations
Click on the arrows to change the translation direction.
Bilingual Dictionaries
English–Chinese (Simplified)
Chinese (Simplified)–English
English–Chinese (Traditional)
Chinese (Traditional)–English
English–Dutch
Dutch–English
English–French
French–English
English–German
German–English
English–Indonesian
Indonesian–English
English–Italian
Italian–English
English–Japanese
Japanese–English
English–Norwegian
Norwegian–English
English–Polish
Polish–English
English–Portuguese
Portuguese–English
English–Spanish
Spanish–English
English–Swedish
Swedish–English
Semi-bilingual Dictionaries
English–Arabic
English–Bengali
English–Catalan
English–Czech
English–Danish
English–Gujarati
English–Hindi
English–Korean
English–Malay
English–Marathi
English–Russian
English–Tamil
English–Telugu
English–Thai
English–Turkish
English–Ukrainian
English–Urdu
English–Vietnamese
Translate
Grammar
Thesaurus
Pronunciation
Cambridge Dictionary +Plus
Shop
Cambridge Dictionary +Plus
My profile
+Plus help
Log out
Log in /
Sign up
English (US)
Change
English (UK)
English (US)
Español
Русский
Português
Deutsch
Français
Italiano
中文 (简体)
正體中文 (繁體)
Polski
한국어
Türkçe
日本語
Tiếng Việt
Nederlands
Svenska
Dansk
Norsk
हिंदी
বাঙ্গালি
मराठी
ગુજરાતી
தமிழ்
తెలుగు
Українська
Follow us
Choose a dictionary
Recent and Recommended
Definitions
Clear explanations of natural written and spoken English
English
Learner’s Dictionary
Essential British English
Essential American English
Grammar and thesaurus
Usage explanations of natural written and spoken English
Grammar
Thesaurus
Pronunciation
British and American pronunciations with audio
English Pronunciation
Translation
Click on the arrows to change the translation direction.
Bilingual Dictionaries
English–Chinese (Simplified)
Chinese (Simplified)–English
English–Chinese (Traditional)
Chinese (Traditional)–English
English–Dutch
Dutch–English
English–French
French–English
English–German
German–English
English–Indonesian
Indonesian–English
English–Italian
Italian–English
English–Japanese
Japanese–English
English–Norwegian
Norwegian–English
English–Polish
Polish–English
English–Portuguese
Portuguese–English
English–Spanish
Spanish–English
English–Swedish
Swedish–English
Semi-bilingual Dictionaries
English–Arabic
English–Bengali
English–Catalan
English–Czech
English–Danish
English–Gujarati
English–Hindi
English–Korean
English–Malay
English–Marathi
English–Russian
English–Tamil
English–Telugu
English–Thai
English–Turkish
English–Ukrainian
English–Urdu
English–Vietnamese
Dictionary +Plus
Word Lists
Choose your language
English (US)
English (UK)
Español
Русский
Português
Deutsch
Français
Italiano
中文 (简体)
正體中文 (繁體)
Polski
한국어
Türkçe
日本語
Tiếng Việt
Nederlands
Svenska
Dansk
Norsk
हिंदी
বাঙ্গালি
मराठी
ગુજરાતી
தமிழ்
తెలుగు
Українська
Contents
English
Verb
promise (SAY CERTAINLY)
promise (BE EXPECTED)
promise to be good, exciting, etc.
Noun
promise (SAY CERTAINLY)
keep/break a promise
promise (EXPECTED)
Intermediate
Verb
promise (STATE CONFIDENTLY)
promise (HAVE LIKELY SUCCESS)
Noun
promise (LIKELY SUCCESS)
promise (CONFIDENT STATEMENT)
Examples
Collocations
Translations
Grammar
All translations
My word lists
Add promise to one of your lists below, or create a new one.
More
Go to your word lists
Tell us about this example sentence:
The word in the example sentence does not match the entry word.
The sentence contains offensive content.
Cancel
Submit
The word in the example sentence does not match the entry word.
The sentence contains offensive content.
Cancel
Submit
JavaScript Promise and Promise Chaining
JavaScript Promise and Promise Chaining
Courses
Tutorials
Examples
Try Programiz PRO
Course Index
Explore Programiz
Python
JavaScript
SQL
HTML
R
C
C++
Java
RUST
Golang
Kotlin
Swift
C#
DSA
Popular Tutorials
Operators in JavaScript
JavaScript for Loop
Functions in JavaScript
JavaScript Objects
Arrays in JavaScript
Start Learning JavaScript
Popular Examples
JavaScript "Hello World" Program
Calculate the area of a triangle
Check if a number is odd or even
Find the GCD
Print the Fibonacci series
Explore JavaScript Examples
Reference Materials
String Methods
Array Methods
Math Object
View all
Learning Paths
Challenges
Learn Python Interactively
Try for Free
Courses
Interactive SQL Course
Interactive C Course
Interactive Java Course
View all Courses
Python
JavaScript
SQL
HTML
R
C
C++
Java
More languages
Popular Tutorials
Operators in JavaScript
JavaScript for Loop
Functions in JavaScript
JavaScript Objects
Arrays in JavaScript
Start Learning JavaScript
All JavaScript Tutorials
Reference Materials
String Methods
Array Methods
Math Object
View all
Python
JavaScript
R
C
C++
Java
Kotlin
Popular Examples
JavaScript "Hello World" Program
Calculate the area of a triangle
Check if a number is odd or even
Find the GCD
Print the Fibonacci series
All JavaScript Examples
JS IntroductionGetting StartedJS Variables & ConstantsJS console.logJavaScript Data typesJavaScript OperatorsJavaScript CommentsJS Type ConversionsJS Control FlowJS Comparison OperatorsJavaScript if else StatementJavaScript for loopJavaScript while loopJavaScript break StatementJavaScript continue StatementJavaScript switch StatementJS FunctionsJavaScript FunctionVariable ScopeJavaScript HoistingJavaScript RecursionJS ObjectsJavaScript ObjectsJavaScript Methods & thisJavaScript ConstructorJavaScript Getter and SetterJavaScript PrototypeJS TypesJavaScript ArrayJS Multidimensional ArrayJavaScript StringJavaScript for...in loopJavaScript NumberJavaScript SymbolExceptions and ModulesJavaScript try...catch...finallyJavaScript throw StatementJavaScript ModulesJS ES6JavaScript ES6JavaScript Arrow FunctionJavaScript Default ParametersJavaScript Template LiteralsJavaScript Spread OperatorJavaScript MapJavaScript SetDestructuring AssignmentJavaScript ClassesJavaScript InheritanceJavaScript for...ofJavaScript ProxiesJavaScript AsynchronousJavaScript setTimeout()JavaScript CallBack FunctionJavaScript PromiseJavascript async/awaitJavaScript setInterval()MiscellaneousJavaScript JSONJavaScript Date and TimeJavaScript ClosureJavaScript thisJavaScript use strictIterators and IterablesJavaScript GeneratorsJavaScript Regular ExpressionsJavaScript Browser DebuggingUses of JavaScript
JavaScript Tutorials
Javscript async/await
JavaScript ES6
JavaScript Arrow Function
JavaScript try...catch...finally Statement
JavaScript throw Statement
JavaScript CallBack Function
JavaScript Promise and Promise Chaining
In JavaScript, a promise is a good way to handle asynchronous operations. It is used to find out if the asynchronous operation is successfully completed or not.
A promise may have one of three states.
Pending
Fulfilled
Rejected
A promise starts in a pending state. That means the process is not complete. If the operation is successful, the process ends in a fulfilled state. And, if an error occurs, the process ends in a rejected state.
For example, when you request data from the server by using a promise, it will be in a pending state. When the data arrives successfully, it will be in a fulfilled state. If an error occurs, then it will be in a rejected state.
Create a Promise
To create a promise object, we use the Promise() constructor.
let promise = new Promise(function(resolve, reject){
//do something
});
The Promise() constructor takes a function as an argument. The function also accepts two functions resolve() and reject().
If the promise returns successfully, the resolve() function is called. And, if an error occurs, the reject() function is called.
Let's suppose that the program below is an asynchronous program. Then the program can be handled by using a promise.
Example 1: Program with a Promise
const count = true;
let countValue = new Promise(function (resolve, reject) {
if (count) {
resolve("There is a count value.");
} else {
reject("There is no count value");
}
});
console.log(countValue);
Output
Promise {
In the above program, a Promise object is created that takes two functions: resolve() and reject(). resolve() is used if the process is successful and reject() is used when an error occurs in the promise.
The promise is resolved if the value of count is true.
Working of JavaScript promise
JavaScript Promise Chaining
Promises are useful when you have to handle more than one asynchronous task, one after another. For that, we use promise chaining.
You can perform an operation after a promise is resolved using methods then(), catch() and finally().
JavaScript then() method
The then() method is used with the callback when the promise is successfully fulfilled or resolved.
The syntax of then() method is:
promiseObject.then(onFulfilled, onRejected);
Example 2: Chaining the Promise with then()
// returns a promise
let countValue = new Promise(function (resolve, reject) {
resolve("Promise resolved");
});
// executes when promise is resolved successfully
countValue
.then(function successValue(result) {
console.log(result);
})
.then(function successValue1() {
console.log("You can call multiple functions this way.");
});
Output
Promise resolved
You can call multiple functions this way.
In the above program, the then() method is used to chain the functions to the promise. The then() method is called when the promise is resolved successfully.
You can chain multiple then() methods with the promise.
JavaScript catch() method
The catch() method is used with the callback when the promise is rejected or if an error occurs. For example,
// returns a promise
let countValue = new Promise(function (resolve, reject) {
reject('Promise rejected');
});
// executes when promise is resolved successfully
countValue.then(
function successValue(result) {
console.log(result);
},
)
// executes if there is an error
.catch(
function errorValue(result) {
console.log(result);
}
);
Output
Promise rejected
In the above program, the promise is rejected. And the catch() method is used with a promise to handle the error.
Working of JavaScript promise chaining
JavaScript Promise Versus Callback
Promises are similar to callback functions in a sense that they both can be used to handle asynchronous tasks.
JavaScript callback functions can also be used to perform synchronous tasks.
Their differences can be summarized in the following points:
JavaScript Promise
The syntax is user-friendly and easy to read.
Error handling is easier to manage.
Example:
api().then(function(result) {
return api2() ;
}).then(function(result2) {
return api3();
}).then(function(result3) {
// do work
}).catch(function(error) {
//handle any error that may occur before this point
});
JavaScript Callback
The syntax is difficult to understand.
Error handling may be hard to manage.
Example:
api(function(result){
api2(function(result2){
api3(function(result3){
// do work
if(error) {
// do something
}
else {
// do something
}
});
});
});
JavaScript finally() method
You can also use the finally() method with promises. The finally() method gets executed when the promise is either resolved successfully or rejected. For example,
// returns a promise
let countValue = new Promise(function (resolve, reject) {
// could be resolved or rejected
resolve('Promise resolved');
});
// add other blocks of code
countValue.finally(
function greet() {
console.log('This code is executed.');
}
);
Output
This code is executed.
JavaScript Promise Methods
There are various methods available to the Promise object.
Method
Description
all(iterable)
Waits for all promises to be resolved or any one to be rejected
allSettled(iterable)
Waits until all promises are either resolved or rejected
any(iterable)
Returns the promise value as soon as any one of the promises is fulfilled
race(iterable)
Wait until any of the promises is resolved or rejected
reject(reason)
Returns a new Promise object that is rejected for the given reason
resolve(value)
Returns a new Promise object that is resolved with the given value
catch()
Appends the rejection handler callback
then()
Appends the resolved handler callback
finally()
Appends a handler to the promise
To learn more about promises in detail, visit JavaScript Promises.
Also Read:
Javscript async/await
Table of Contents
Introduction
Create a Promise
Promise Chaining
The then() method
The catch() method
JavaScript Promise vs Callback
The finally() method
JavaScript Promise Methods
Previous Tutorial:
JS CallBack
Next Tutorial:
JS async/await
Share on:
Did you find this article helpful?
Sorry about that.
How can we improve it?
Feedback *
Leave this field blank
Related Tutorials JavaScript TutorialJavscript async/await JavaScript TutorialJavaScript ES6 JavaScript TutorialJavaScript Arrow Function JavaScript TutorialJavaScript try...catch...finally Statement
Join our newsletter for the latest updates.
This is required.
Join
Join our newsletter for the latest updates.
This is required.
Join
Tutorials
Python 3 Tutorial
JavaScript Tutorial
SQL Tutorial
HTML Tutorial
R Tutorial
C Tutorial
C++
Tutorial
Java
Tutorial
Rust Tutorial
Go Tutorial
Kotlin Tutorial
Swift
Tutorial
C#
Tutorial
DSA
Tutorial
Examples
Python Examples
JavaScript Examples
C
Examples
Java Examples
Kotlin Examples
C++ Examples
Company
Change Ad Consent
Do not sell my data
About
Advertising
Privacy Policy
Terms & Conditions
Contact
Blog
Careers
Youtube
Apps
Learn Python
Learn C Programming
Learn Java
© Parewa Labs Pvt. Ltd. All rights reserved.
promise verb - Definition, pictures, pronunciation and usage notes | Oxford Advanced Learner's Dictionary at OxfordLearnersDictionaries.com
promise verb - Definition, pictures, pronunciation and usage notes | Oxford Advanced Learner's Dictionary at OxfordLearnersDictionaries.com
Toggle navigation
Redeem
Upgrade
Help
Sign in
Dictionaries
Dictionaries home
English
American English
Academic
Collocations
German-English
Grammar
Grammar home
Practical English Usage
Learn & Practise Grammar (Beta)
Word Lists
Word Lists home
My Word Lists
Topics
Recent additions
Resources
Resources home
Text Checker
Sign in
Dictionaries
Dictionaries home
English
American English
Academic
Collocations
German-English
Grammar
Grammar home
Practical English Usage
Learn & Practise Grammar (Beta)
Word Lists
Word Lists home
My Word Lists
Topics
Recent additions
Resources
Resources home
Text Checker
Redeem
Upgrade
Help
TOP
English
English
American English
Academic English
Collocations
Practical English Usage
German-English
English-German
English
American English
Enter search text
Definition of promise verb from the Oxford Advanced Learner's Dictionary
promise verb /ˈprɒmɪs/ /ˈprɑːmɪs/Verb Forms present simple I / you / we / they promise /ˈprɒmɪs/ /ˈprɑːmɪs/ he / she / it promises /ˈprɒmɪsɪz/ /ˈprɑːmɪsɪz/ past simple promised /ˈprɒmɪst/ /ˈprɑːmɪst/ past participle promised /ˈprɒmɪst/ /ˈprɑːmɪst/ -ing form promising /ˈprɒmɪsɪŋ/ /ˈprɑːmɪsɪŋ/Idioms
jump to other results
[intransitive, transitive] to tell somebody that you will definitely do or not do something, or that something will definitely happen‘We haven't got time to go to the park.’ ‘But you promised!’ promise to do something The college principal promised to look into the matter.‘Promise not to tell anyone!’ ‘I promise.’They arrived at 7.30 as they had promised. promise something The government has promised a full investigation into the disaster.I'll see what I can do but I can't promise anything. promise (that)… The brochure promised (that) the local food would be superb. promise somebody (that)… You promised me (that) you’d be home early tonight. promise something to somebody He promised the money to his grandchildren. promise somebody something He promised his grandchildren the money. promise yourself something I've promised myself some fun when the exams are over. promise (somebody) + speech ‘I'll be back soon,’ she promised.More Like This Verbs with two objectsVerbs with two objectsbetbringbuildbuycostgetgiveleavelendmakeofferowepasspayplaypostpromisereadrefusesellsendshowsingtaketeachtellthrowwishwriteExtra ExamplesHe repeatedly promised to cut taxes in his campaign.I am sending you information on holidays as promised.I can definitely promise you that I'll do all I can to help.I can't promise I'll be there.She promised faithfully that she would come.I've promised my old computer to Jane.Oxford Collocations Dictionaryadverbfaithfullysolemnlyinitially…verb + promisecancannotseem to…prepositiontophrasesas promisedI can’t promise anythingSee full entry
Questions about grammar and vocabulary?
Find the answers with Practical English Usage online, your indispensable guide to problems in English.
[transitive] to make something seem likely to happen; to show signs of something it promises to be something It promises to be an exciting few days. promise something There were dark clouds overhead promising rain.Extra ExamplesThe plan seemed to promise a new beginning.It was a disappointing end to a season which had promised so much for the team.The new drug promises to bring relief to thousands of asthma sufferers.More Like This Verbs usually followed by infinitivesVerbs usually followed by infinitivesaffordagreeappeararrangeattemptbegchooseconsentdecideexpectfailhappenhesitatehopeintendlearnmanagemeanneglectofferpreparepretendpromiserefusesweartrywantwish
Word Originlate Middle English: from Latin promissum ‘something promised’, neuter past participle of promittere ‘put forth, promise’, from pro- ‘forward’ + mittere ‘send’.Idioms I (can) promise you (informal) used as a way of encouraging or warning somebody about somethingI can promise you, you'll have a wonderful time.If you don't take my advice, you'll regret it, I promise you. promise (somebody) the earth/moon/world (informal) to make promises that will be impossible to keepPoliticians promise the earth before an election, but things are different afterwards. See promise in the Oxford Advanced American DictionarySee promise in the Oxford Learner's Dictionary of Academic EnglishCheck pronunciation:
promise
Other results
All matches
promise noun
Promise Keepers
a lick and a promise
promise (somebody) the earth/moon/world
promise (somebody) the moon/earth/world
Idioms
a lick and a promise
promise (somebody) the earth/moon/world
promise (somebody) the moon/earth/world
Nearby words
promiscuous adjective
promiscuously adverb
promise verb
promise noun
the Promised Land noun
boost
verb
From the Topic
Change, cause and effect
B2
Oxford Learner's Dictionaries Word of the Day
Oxford Learner's Dictionaries
Browse Dictionaries & Grammar
Search Box
System Requirements
Contact Us
More from us
Oxford Learner's Dictionaries API
English Language Teaching
Oxford Teacher's Club
Oxford Learner's Bookshelf
Oxford Languages
Who we are
About Us
Our history
Annual report
The way we work
Working for OUP
Oxford University Press is a department of the University of Oxford. It furthers the University's objective of excellence in research, scholarship, and education by publishing worldwide
Privacy Policy
Cookie Policy
Consent Management
Terms & Conditions
Accessibility
Legal Notice
English (UK)
English (US)
© 2024 Oxford University Press
Promise
iseENARعربيENEnglishESEspañolFAفارسیFRFrançaisIDIndonesiaITItalianoJA日本語KO한국어RUРусскийTRTürkçeUKУкраїнськаZH简体中文We want to make this open-source project available for people all around the world. Help to translate the content of this tutorial to your language!
BuyEPUB/PDFSearchSearchTutorial mapLight themeDark themeShareعربيEnglishEspañolفارسیFrançaisIndonesiaItaliano日本語한국어РусскийTürkçeУкраїнська简体中文TutorialThe JavaScript languagePromises, async/awaitAugust 14, 2022PromiseImagine that you’re a top singer, and fans ask day and night for your upcoming song.
To get some relief, you promise to send it to them when it’s published. You give your fans a list. They can fill in their email addresses, so that when the song becomes available, all subscribed parties instantly receive it. And even if something goes very wrong, say, a fire in the studio, so that you can’t publish the song, they will still be notified.
Everyone is happy: you, because the people don’t crowd you anymore, and fans, because they won’t miss the song.
This is a real-life analogy for things we often have in programming:
A “producing code” that does something and takes time. For instance, some code that loads the data over a network. That’s a “singer”.
A “consuming code” that wants the result of the “producing code” once it’s ready. Many functions may need that result. These are the “fans”.
A promise is a special JavaScript object that links the “producing code” and the “consuming code” together. In terms of our analogy: this is the “subscription list”. The “producing code” takes whatever time it needs to produce the promised result, and the “promise” makes that result available to all of the subscribed code when it’s ready.
The analogy isn’t terribly accurate, because JavaScript promises are more complex than a simple subscription list: they have additional features and limitations. But it’s fine to begin with.
The constructor syntax for a promise object is:
let promise = new Promise(function(resolve, reject) {
// executor (the producing code, "singer")
});
The function passed to new Promise is called the executor. When new Promise is created, the executor runs automatically. It contains the producing code which should eventually produce the result. In terms of the analogy above: the executor is the “singer”.
Its arguments resolve and reject are callbacks provided by JavaScript itself. Our code is only inside the executor.
When the executor obtains the result, be it soon or late, doesn’t matter, it should call one of these callbacks:
resolve(value) — if the job is finished successfully, with result value.
reject(error) — if an error has occurred, error is the error object.
So to summarize: the executor runs automatically and attempts to perform a job. When it is finished with the attempt, it calls resolve if it was successful or reject if there was an error.
The promise object returned by the new Promise constructor has these internal properties:
state — initially "pending", then changes to either "fulfilled" when resolve is called or "rejected" when reject is called.
result — initially undefined, then changes to value when resolve(value) is called or error when reject(error) is called.
So the executor eventually moves promise to one of these states:
Later we’ll see how “fans” can subscribe to these changes.
Here’s an example of a promise constructor and a simple executor function with “producing code” that takes time (via setTimeout):
let promise = new Promise(function(resolve, reject) {
// the function is executed automatically when the promise is constructed
// after 1 second signal that the job is done with the result "done"
setTimeout(() => resolve("done"), 1000);
});
We can see two things by running the code above:
The executor is called automatically and immediately (by new Promise).
The executor receives two arguments: resolve and reject. These functions are pre-defined by the JavaScript engine, so we don’t need to create them. We should only call one of them when ready.
After one second of “processing”, the executor calls resolve("done") to produce the result. This changes the state of the promise object:
That was an example of a successful job completion, a “fulfilled promise”.
And now an example of the executor rejecting the promise with an error:
let promise = new Promise(function(resolve, reject) {
// after 1 second signal that the job is finished with an error
setTimeout(() => reject(new Error("Whoops!")), 1000);
});
The call to reject(...) moves the promise object to "rejected" state:
To summarize, the executor should perform a job (usually something that takes time) and then call resolve or reject to change the state of the corresponding promise object.
A promise that is either resolved or rejected is called “settled”, as opposed to an initially “pending” promise.
There can be only a single result or an error
The executor should call only one resolve or one reject. Any state change is final.
All further calls of resolve and reject are ignored:
let promise = new Promise(function(resolve, reject) {
resolve("done");
reject(new Error("…")); // ignored
setTimeout(() => resolve("…")); // ignored
});
The idea is that a job done by the executor may have only one result or an error.
Also, resolve/reject expect only one argument (or none) and will ignore additional arguments.
Reject with Error objects
In case something goes wrong, the executor should call reject. That can be done with any type of argument (just like resolve). But it is recommended to use Error objects (or objects that inherit from Error). The reasoning for that will soon become apparent.
Immediately calling resolve/reject
In practice, an executor usually does something asynchronously and calls resolve/reject after some time, but it doesn’t have to. We also can call resolve or reject immediately, like this:
let promise = new Promise(function(resolve, reject) {
// not taking our time to do the job
resolve(123); // immediately give the result: 123
});
For instance, this might happen when we start to do a job but then see that everything has already been completed and cached.
That’s fine. We immediately have a resolved promise.
The state and result are internal
The properties state and result of the Promise object are internal. We can’t directly access them. We can use the methods .then/.catch/.finally for that. They are described below.
Consumers: then, catchA Promise object serves as a link between the executor (the “producing code” or “singer”) and the consuming functions (the “fans”), which will receive the result or error. Consuming functions can be registered (subscribed) using the methods .then and .catch.
thenThe most important, fundamental one is .then.
The syntax is:
promise.then(
function(result) { /* handle a successful result */ },
function(error) { /* handle an error */ }
);
The first argument of .then is a function that runs when the promise is resolved and receives the result.
The second argument of .then is a function that runs when the promise is rejected and receives the error.
For instance, here’s a reaction to a successfully resolved promise:
let promise = new Promise(function(resolve, reject) {
setTimeout(() => resolve("done!"), 1000);
});
// resolve runs the first function in .then
promise.then(
result => alert(result), // shows "done!" after 1 second
error => alert(error) // doesn't run
);
The first function was executed.
And in the case of a rejection, the second one:
let promise = new Promise(function(resolve, reject) {
setTimeout(() => reject(new Error("Whoops!")), 1000);
});
// reject runs the second function in .then
promise.then(
result => alert(result), // doesn't run
error => alert(error) // shows "Error: Whoops!" after 1 second
);
If we’re interested only in successful completions, then we can provide only one function argument to .then:
let promise = new Promise(resolve => {
setTimeout(() => resolve("done!"), 1000);
});
promise.then(alert); // shows "done!" after 1 second
catchIf we’re interested only in errors, then we can use null as the first argument: .then(null, errorHandlingFunction). Or we can use .catch(errorHandlingFunction), which is exactly the same:
let promise = new Promise((resolve, reject) => {
setTimeout(() => reject(new Error("Whoops!")), 1000);
});
// .catch(f) is the same as promise.then(null, f)
promise.catch(alert); // shows "Error: Whoops!" after 1 second
The call .catch(f) is a complete analog of .then(null, f), it’s just a shorthand.
Cleanup: finallyJust like there’s a finally clause in a regular try {...} catch {...}, there’s finally in promises.
The call .finally(f) is similar to .then(f, f) in the sense that f runs always, when the promise is settled: be it resolve or reject.
The idea of finally is to set up a handler for performing cleanup/finalizing after the previous operations are complete.
E.g. stopping loading indicators, closing no longer needed connections, etc.
Think of it as a party finisher. No matter was a party good or bad, how many friends were in it, we still need (or at least should) do a cleanup after it.
The code may look like this:
new Promise((resolve, reject) => {
/* do something that takes time, and then call resolve or maybe reject */
})
// runs when the promise is settled, doesn't matter successfully or not
.finally(() => stop loading indicator)
// so the loading indicator is always stopped before we go on
.then(result => show result, err => show error)
Please note that finally(f) isn’t exactly an alias of then(f,f) though.
There are important differences:
A finally handler has no arguments. In finally we don’t know whether the promise is successful or not. That’s all right, as our task is usually to perform “general” finalizing procedures.
Please take a look at the example above: as you can see, the finally handler has no arguments, and the promise outcome is handled by the next handler.
A finally handler “passes through” the result or error to the next suitable handler.
For instance, here the result is passed through finally to then:
new Promise((resolve, reject) => {
setTimeout(() => resolve("value"), 2000);
})
.finally(() => alert("Promise ready")) // triggers first
.then(result => alert(result)); // <-- .then shows "value"
As you can see, the value returned by the first promise is passed through finally to the next then.
That’s very convenient, because finally is not meant to process a promise result. As said, it’s a place to do generic cleanup, no matter what the outcome was.
And here’s an example of an error, for us to see how it’s passed through finally to catch:
new Promise((resolve, reject) => {
throw new Error("error");
})
.finally(() => alert("Promise ready")) // triggers first
.catch(err => alert(err)); // <-- .catch shows the error
A finally handler also shouldn’t return anything. If it does, the returned value is silently ignored.
The only exception to this rule is when a finally handler throws an error. Then this error goes to the next handler, instead of any previous outcome.
To summarize:
A finally handler doesn’t get the outcome of the previous handler (it has no arguments). This outcome is passed through instead, to the next suitable handler.
If a finally handler returns something, it’s ignored.
When finally throws an error, then the execution goes to the nearest error handler.
These features are helpful and make things work just the right way if we use finally how it’s supposed to be used: for generic cleanup procedures.
We can attach handlers to settled promises
If a promise is pending, .then/catch/finally handlers wait for its outcome.
Sometimes, it might be that a promise is already settled when we add a handler to it.
In such case, these handlers just run immediately:
// the promise becomes resolved immediately upon creation
let promise = new Promise(resolve => resolve("done!"));
promise.then(alert); // done! (shows up right now)
Note that this makes promises more powerful than the real life “subscription list” scenario. If the singer has already released their song and then a person signs up on the subscription list, they probably won’t receive that song. Subscriptions in real life must be done prior to the event.
Promises are more flexible. We can add handlers any time: if the result is already there, they just execute.
Example: loadScriptNext, let’s see more practical examples of how promises can help us write asynchronous code.
We’ve got the loadScript function for loading a script from the previous chapter.
Here’s the callback-based variant, just to remind us of it:
function loadScript(src, callback) {
let script = document.createElement('script');
script.src = src;
script.onload = () => callback(null, script);
script.onerror = () => callback(new Error(`Script load error for ${src}`));
document.head.append(script);
}
Let’s rewrite it using Promises.
The new function loadScript will not require a callback. Instead, it will create and return a Promise object that resolves when the loading is complete. The outer code can add handlers (subscribing functions) to it using .then:
function loadScript(src) {
return new Promise(function(resolve, reject) {
let script = document.createElement('script');
script.src = src;
script.onload = () => resolve(script);
script.onerror = () => reject(new Error(`Script load error for ${src}`));
document.head.append(script);
});
}
Usage:
let promise = loadScript("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js");
promise.then(
script => alert(`${script.src} is loaded!`),
error => alert(`Error: ${error.message}`)
);
promise.then(script => alert('Another handler...'));
We can immediately see a few benefits over the callback-based pattern:
Promises
Callbacks
Promises allow us to do things in the natural order. First, we run loadScript(script), and .then we write what to do with the result.
We must have a callback function at our disposal when calling loadScript(script, callback). In other words, we must know what to do with the result before loadScript is called.
We can call .then on a Promise as many times as we want. Each time, we’re adding a new “fan”, a new subscribing function, to the “subscription list”. More about this in the next chapter: Promises chaining.
There can be only one callback.
So promises give us better code flow and flexibility. But there’s more. We’ll see that in the next chapters.
TasksRe-resolve a promise?What’s the output of the code below?
let promise = new Promise(function(resolve, reject) {
resolve(1);
setTimeout(() => resolve(2), 1000);
});
promise.then(alert);
solutionThe output is: 1.
The second call to resolve is ignored, because only the first call of reject/resolve is taken into account. Further calls are ignored.
Delay with a promiseThe built-in function setTimeout uses callbacks. Create a promise-based alternative.
The function delay(ms) should return a promise. That promise should resolve after ms milliseconds, so that we can add .then to it, like this:
function delay(ms) {
// your code
}
delay(3000).then(() => alert('runs after 3 seconds'));
solution
function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
delay(3000).then(() => alert('runs after 3 seconds'));
Please note that in this task resolve is called without arguments. We don’t return any value from delay, just ensure the delay.
Animated circle with promiseRewrite the showCircle function in the solution of the task Animated circle with callback so that it returns a promise instead of accepting a callback.
The new usage:
showCircle(150, 150, 100).then(div => {
div.classList.add('message-ball');
div.append("Hello, world!");
});
Take the solution of the task Animated circle with callback as the base.
solutionOpen the solution in a sandbox.Previous lessonNext lessonShareTutorial mapCommentsread this before commenting…If you have suggestions what to improve - please submit a GitHub issue or a pull request instead of commenting.If you can't understand something in the article – please elaborate.To insert few words of code, use the tag, for several lines – wrap them in
tag, for more than 10 lines – use a sandbox (plnkr, jsbin, codepen…)ChapterPromises, async/awaitLesson navigationConsumers: then, catchCleanup: finallyExample: loadScriptTasks (3)CommentsShareEdit on GitHub© 2007—2024 Ilya Kantorabout the projectcontact usterms of usageprivacy pol