会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Leophen
首页
新随笔
联系
管理
2021年2月16日
JS 函数参数默认值、Arguments 和 Rest parameter
摘要: 一、ES 5 中函数默认值写法 function total(x, y, z) { if (y undefined) { y = 2 } if (z undefined) { z = 3 } return x + y + z } console.log(total()) // NaN console
阅读全文
posted @ 2021-02-16 16:47 Leophen
阅读(315)
评论(0)
推荐(0)
编辑
公告