咏竹莉
where there is a will,there is a way
摘要: 1. 函数参数的默认值 基本用法 es6之前,不能直接为函数的参数指定默认值,只能采用变通的方法 function log(x,y) { if (typeof 'undefined') { // 如果y有值,则为y 无值则等于 World y = 'World' } } log('hello') / 阅读全文
posted @ 2021-06-09 10:16 咏竹莉 阅读(68) 评论(0) 推荐(0)