摘要: typescript 函数中的可选参数,参数默认值 必须在末尾 function bird(name: string, age: number = 0){ console.log(age) } //替换age默认值 bird("jessi",5) //使用age参数默认值 bird("jessi") 阅读全文
posted @ 2022-10-07 21:19 yurro 阅读(67) 评论(0) 推荐(0)