codecademy quiz——JavaScript Promise
Evernote Export
- What is the fulfilled value of Promise.all()?
A Promise
An object
An array- What is value of the argument that is passed to the onReject()?
‘success value’
reason
undefined- True or False: The .then() method returns a Promise.
False
True- How many parameters does a Promise constructor take?
2
1
3- What value is printed to the console?
Promise
Object
Number
String- Which one of the following is NOT a state that a Promise resolves to?
Rejected
Fulfilled
Undefined
Pending- What state will this promise be in after 0 seconds?
Fulfilled
Rejected
Pending- What will be printed to the console after running the code provided?
- Which of the executor function’s parameter is called if the asynchronous task completes successfully?
function1
function2
function1 or function2- True or False: promise1 and promise2 both produce the same output.
False
Truecodecademy quiz——JavaScript Promise的更多相关文章
- [Javascript] Promise
Promise 代表着一个异步操作,这个异步操作现在尚未完成,但在将来某刻会被完成. Promise 有三种状态 pending : 初始的状态,尚未知道结果 fulfilled : 代表操作成功 r ...
- Javascript Promise 学习笔记
1. 定义:Promise是抽象异步处理对象以及对其进行各种操作的组件,它把异步处理对象和异步处理规则采用统一的接口进行规范化. 2. ES6 Promises 标准中定义的API: ...
- 【译】JavaScript Promise API
原文地址:JavaScript Promise API 在 JavaScript 中,同步的代码更容易书写和 debug,但是有时候出于性能考虑,我们会写一些异步的代码(代替同步代码).思考这样一个场 ...
- JavaScript Promise:去而复返
原文:http://www.html5rocks.com/en/tutorials/es6/promises/ 作者:Jake Archibald 翻译:Amio 女士们先生们,请准备好迎接 Web ...
- javaScript Promise 入门
Promise是JavaScript的异步编程模式,为繁重的异步回调带来了福音. 一直以来,JavaScript处理异步都是以callback的方式,假设需要进行一个异步队列,执行起来如下: anim ...
- JavaScript Promise异步实现章节的下载显示
Links: JavaScript Promise:简介 1.一章一章顺序地下载显示下载显示 使用Array.reduce()和Promise.resolve()将各章的下载及显示作为整体串联起来. ...
- codecademy课程笔记——JavaScript Promise
Promise是一种表示异步操作最终的结果的对象,一个Promise对象有三种状态 Pending: 初始状态 ,操作还未完成 Fullfilled:操作成功完成,且这个promise现在有一个r ...
- Javascript - Promise学习笔记
最近工作轻松了点,想起了以前总是看到的一个单词promise,于是耐心下来学习了一下. 一:Promise是什么?为什么会有这个东西? 首先说明,Promise是为了解决javascript异步编 ...
- Javascript Promise入门
是什么? https://www.promisejs.org/ What is a promise? The core idea behind promises is that a promise r ...
随机推荐
- SpringBoot系列: CommandLineRunner接口的用处
========================================使用 CommandLineRunner 对Spring Bean进行额外初始化==================== ...
- ORACLE使用CASE WHEN的方法
先写草稿. 说下我的需求,ORACLE数据库有两个字段RECEIVER_MOBILE与RECEIVER_PHONE,同为联系方式.当RECEIVER_MOBILE为空的时候,需要用到RECEIVER_ ...
- Contest2156 - 2019-3-7 高一noip基础知识点 测试2 题解版
传送门 预计得分:100+70+100+50=320 实际得分100+63+77+30=270 Ctrl_C+Ctrl_V时不要粘贴翻译的,直接粘原文, In a single line of the ...
- AWT 新建窗口
新建一个窗口 包 import java.awt.*; 定义 Frame frm_Draw = new Frame("Text"); 初始化代码 public void Frame ...
- django登录
一. form表单使用注意事项: 1. action="" 提交地址, method='post' 请求方式 2. input 标签要有name属性才能被获取 3. 有一个inpu ...
- hibernate之SessionFactory对象
Factory --- 工厂 利用Configuration得到 hibernate3.版本 SessionFactory factory = Configuration.buildSessionFa ...
- eclipse+tomcat出现警告警告: [SetPropertiesRule]...
启动tomcat出现警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to ' ...
- JQuery EasyUI 之 messager基本使用
♦ 基本语法:$.messager.alert ( title , msg , icon , fn ): 其中,icon有四种设置:"error"."info" ...
- nginx php-fpm开启session
一. 权限问题,这个是发生在多数情况下 找到php session目录设置给 nginx 或者 apache最大权限 二. 配置问题按如下就没啥问题了 [Session] session.save ...
- GitHub界面初识
现在很多 HR 在招聘程序员的需求都会提到「有 Github 项目者优先」,大部分求职者也会在简历中附上 Github 链接. 作为一个专业的 HR,即便不懂代码,也不能被一个链接唬住.今天我就手 ...