File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- # Generator 函数:异步操作
1+ # Generator 函数的异步应用
22
33异步编程对 JavaScript 语言太重要。Javascript 语言的执行环境是“单线程”的,如果没有异步编程,根本没法用,非卡死不可。本章主要介绍 Generator 函数如何完成异步操作。
44
Original file line number Diff line number Diff line change 1- # Generator 函数:语法
1+ # Generator 函数的语法
22
33## 简介
44
55### 基本概念
66
7- Generator 函数是 ES6 提供的一种异步编程解决方案,语法行为与传统函数完全不同。本章详细介绍Generator 函数的语法和 API,它的异步编程应用请看《Generator 函数:异步操作 》一章。
7+ Generator 函数是 ES6 提供的一种异步编程解决方案,语法行为与传统函数完全不同。本章详细介绍Generator 函数的语法和 API,它的异步编程应用请看《Generator 函数的异步应用 》一章。
88
99Generator 函数有多种理解角度。从语法上,首先可以把它理解成,Generator 函数是一个状态机,封装了多个内部状态。
1010
Original file line number Diff line number Diff line change 21211 . [ Reflect] ( #docs/reflect )
22221 . [ Promise 对象] ( #docs/promise )
23231 . [ Iterator 和 for...of 循环] ( #docs/iterator )
24- 1 . [ Generator 函数:语法 ] ( #docs/generator )
25- 1 . [ Generator 函数:异步操作 ] ( #docs/generator-async )
24+ 1 . [ Generator 函数的语法 ] ( #docs/generator )
25+ 1 . [ Generator 函数的异步应用 ] ( #docs/generator-async )
26261 . [ async 函数] ( #docs/async )
27271 . [ Class] ( #docs/class )
28281 . [ Decorator] ( #docs/decorator )
You can’t perform that action at this time.
0 commit comments