1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages

This commit is contained in:
ruanyf 2017-04-29 06:33:55 +08:00
commit 035e2921c2
2 changed files with 2 additions and 2 deletions

View File

@ -788,7 +788,7 @@ const myMap = new Map()
**2数组 转为 Map**
将数组入 Map 构造函数,就可以转为 Map。
将数组入 Map 构造函数,就可以转为 Map。
```javascript
new Map([

View File

@ -196,7 +196,7 @@ function getComplement(color) {
## 实例:消除魔术字符串
魔术字符串指的是,在代码之中多次出现、与代码形成强耦合的某一个具体的字符串或者数值。风格良好的代码,应该尽量消除魔术字符串,由含义清晰的变量代替。
魔术字符串指的是,在代码之中多次出现、与代码形成强耦合的某一个具体的字符串或者数值。风格良好的代码,应该尽量消除魔术字符串,由含义清晰的变量代替。
```javascript
function getArea(shape, options) {