This will change the status of the promise to fulfilled . Pending:初始状态,非fulfilled 或rejected. Pending: initial state, not fulfilled or rejected. 今年我们开发了一个新项目叫做SellerFulfilled Prime。 This year, we created a new program called Seller Fulfilled Prime. Promise存在三种状态:挂起,fulfilled 和rejected。 Promises have three states: pending, fulfilled , and rejected. Fulfilled -异步操作已完成,并且promise有值。Fulfilled - the asynchronous operation has completed, and the promise has a value.
今年,我们开展了名为“SellerFulfilled Prime”的服务。 This year, we created a new program called Seller Fulfilled Prime. 如果它被放入fulfilled 并且你想忽略它,那么很酷,你也可以这样做。 If it gets put into fulfilled and you want to ignore it, cool, you can do that too. Lovemetender,温柔地爱我,lovemetrue,真挚地爱我,allmydreamsfulfilled . Love me tender, love me true, all my dreams fulfilled ". 一旦Promise变成了Fulfilled 或Rejected,则无法再转化为任何其他状态了。 Once a promise is fulfilled or rejected, it cannot be changed to any other state. 如果x是pending状态,x必须保持该状态,直到x是fulfilled 或者rejected。 If x is pending, promise must remain pending until x is fulfilled or rejected. 一旦Promise处于fulfilled 或者rejected状态,就再不能转换为其它任何状态。 Once a promise is fulfilled or rejected, it cannot be changed to any other state. 蜂鸣器始终处于三种不同状态中的一种-pending,fulfilled 或rejected。 The buzzer will always be in one of three different states- pending, fulfilled , or rejected. 在该段代码中,p1是以fulfilled promise的身份所创建,而其它的promise需要做任务调度。 In this code, p1 is created as a fulfilled promise while the others schedule jobs. Resolve-一个允许你更改Promise状态的功能fulfilled . Reject- a function that allows you to change the status of the promise to rejected .它必须在promisefulfilled 后调用,且promise的value为其第一个参数。 It must be called after promise is fulfilled , with promise's value as its first argument. 完全像蜂鸣器,一个Promise可以处于三种状态之一pending,fulfilled 或者rejected。 Exactly like the buzzer, a Promise can be in one of three states, pending, fulfilled or rejected. 该thenable对象中的状态为fulfilled ,因为then()方法内部调用了resolve(42)。 The promise state for thenable is fulfilled because resolve(42) is called inside the then() method. 如果x处于pending状态,则promise必须保持pending状态直到x的状态变成fulfilled 或rejected。 If x is pending, promise must remain pending until x is fulfilled or rejected. 亚马逊在其FBA项目上则更领先一步,他们已经开始向卖家提供SellerFulfilled Prime项目。 Amazon have gone one step further with their FBA programme where they have started offering Seller Fulfilled Prime. All()会创建p4promise,并在p1,p2,p3fulfilled 之后转变状态为fulfilled 。 All() creates promise p4, which is ultimately fulfilled when promises p1, p2, and p3 are fulfilled . 一个Promise被设置后(settled:代表运算已经完成),它的状态要么是fulfilled 要么是rejected。 A promise is settled(the computation it represents has finished) if it is either fulfilled or rejected. 我们推出了Voodoo的Fulfilled ,使制造更容易获得,我们很高兴看到创作者对FBV做了什么,“. We launched Fulfilled by Voodoo to make manufacturing more accessible, and we're excited to see what creators do with FBV.”. Sears与亚马逊类似,因为它们拥有自己的品牌以及"Fulfilled bySears"选项。 Sears which is somewhat similar to Amazon in the sense that they have their own brand and a‘Fulfilled by Sears' option. 我们将setTimeout再次使用fulfilled 在两秒钟(2000毫秒)之后将Promise的状态更改为。 We will use setTimeout again to change the status of the promise to fulfilled after two seconds(2000 milliseconds). 如果Promise状态为rejected,那么步骤将失败,如果Promise状态为fulfilled ,则步骤将会成功。 If the Promise is rejected then the step will have failed, and if the Promise is fulfilled then the step will have succeeded. 首先,当我们创建了promise时,我们resolve在〜2000毫秒之后调用-这改变了promise的状态fulfilled 。 First, when we created the promise, we invoked resolve after~2000 milliseconds- this changed the status of the promise to fulfilled . 年10月“无限货架”店中店项目正式上线,创新开展Fulfilled byYihaodian新合作模式。 October 2010"Infinite shelf" shop-in-shop project officially launched, and innovatively launched the new cooperation model of Fulfilled by Yihaodian. 如果onFulfilled不是一个函数且promise1已经fulfilled ,则promise2必须以promise1的值fulfilled. If onFulfilled is not a function and promise1 is fulfilled , promise2 must be fulfilled with the same value as promise1.
展示更多例子
结果: 28 ,
时间: 0.0168
English
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt