会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
carrie_zhao
博客园
首页
新随笔
联系
管理
订阅
2020年3月13日
es6求平均值 -- reduce()
摘要: let abc = [99, 54, 123, 78, 82]; let average = abc.reduce((num, item, index) => { if(index != abc.length-1) { return num+item; } else { return (num+it
阅读全文
posted @ 2020-03-13 10:11 carrie_zhao
阅读(1602)
评论(0)
推荐(0)
公告