Skip to content

Commit cf42fb6

Browse files
committed
Update 2018-05-09-ES6常用新语法特性.md
1 parent ea13b61 commit cf42fb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2018-05-09-ES6常用新语法特性.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ ES6是即将到来的新版本JavaScript语言的标准,他给我们带来了
1313
我们先来看一个基本的新特性,在javascript中,定义函数需要关键字function,但是在es6中,还有更先进的写法,我们来看:
1414
es6写法:
1515

16-
```javascript
16+
1717
var human = {
1818
breathe(name) { //不需要function也能定义breathe函数。
1919
console.log(name + ' is breathing...');
2020
}
2121
};
2222
human.breathe('jarson'); //输出 ‘jarson is breathing...’
23-
```
23+
2424

2525
转成js代码:
2626

0 commit comments

Comments
 (0)