Merge pull request #728 from LeoLcy/patch-1

语法错误,箭头函数单行不需要return
This commit is contained in:
Ruan YiFeng
2018-07-25 07:41:44 +08:00
committed by GitHub
+1 -1
View File
@@ -777,7 +777,7 @@ ES5 对空位的处理,已经很不一致了,大多数情况下会忽略空
[,'a'].every(x => x==='a') // true
// reduce方法
[1,,2].reduce((x,y) => return x+y) // 3
[1,,2].reduce((x,y) => x+y) // 3
// some方法
[,'a'].some(x => x !== 'a') // false