首页/ 题库 / [问答题]说说你对Promise的理解。的答案

说说你对Promise的理解。

问答题
2022-04-29 14:25
查看答案

正确答案
依照 Promise/A+ 的定义,Promise 有四种状态:pending:初始状态,非fulfilled或rejected.fulfilled: 成功的操作.rejected: 失败的操作.settled: Promise已被fulfilled或rejected,且不是pending; 另外,fulfilled 与 rejected 一起合称 settled。Promise 对象用来进行延迟(deferred) 和异步(asynchronous)计算.Promise 实例拥有 then 方法(具有 then 方法的对象,通常被称为 thenable)。它的使用方法如下:promise.then(onFulfilled, onRejected); 接收两个函数作为参数,一个在 fulfilled 的时候被调用,一个在 rejected 的时候被调用,接收参数就是 future,onFulfilled 对应 resolve, onRejected 对应reject。

试题解析

标签: 大学试题 工学
相关题目
boost的意思是:help or encourage to increase or improve
eloquent的意思是:fluent or persuasive in speaking or writing

A campus emergency ______ occur at any time of the day or night, weekend, or holiday, with little or no warning.

说说你对“校本课程”的理解与建议。
()any case or suspected case of quarantinable disease,or any case of eruptive disease or any death be discovered,the local quarantine officer must be notified immediately.
Should any case or suspected case of quarantinable disease,or any case of eruptive disease or any death be discovered,the local Quarantine Officer must be()immediately.
什么是移动学习?说说你对移动学习的认识。
Masters are()solely responsible for all damages or accidents of whatever kind resulting from the navigating or handling of their vessels by day or by night.
系统中雷达状态包括Unknown、Operational(or ON)、Failed(or OFF)、Detached。
北平大学第二工学院院长是谁?()
The carrier is liable for loss of or damage to the goods or delay in delivery caused by fire,()the claimant proves that the fire arose from fault or neglect on the part of the carrier,his servants or agents.
(1)说说你对“我们的学生就是我们的未来”的理解。 (2)结合材料,说说教师在学生学习过程中的作用。
Shutdown price(or point,or rule) 停业价格(或停业点、停业原则)
西北工业大学前身国立西北工学院正式成立于()。
翻译:With Average or With Particular Average(WA or WPA)()
说说你对义务教育数学课程总体目标的基本认识。
说说你对宽容、理解、包容的人文精神的理解。
大学生恋爱有利有弊,请说说大学生恋爱的弊端。
大学生恋爱有利有弊,请说说大学生恋爱的好处。
成都科技大学的前身是成都工学院,而成都工学院的前身是()
广告位招租WX:84302438

免费的网站请分享给朋友吧