var myname: string = "Peter";
function test(a: string, b: string, c: string = "Jack") {
console.log(a);
console.log(b);
console.log(c);
}
test("xxx", "yyy", "zzz");
test("xxx","yyy")
有默认值的参数要写在最后
var myname: string = "Peter";
function test(a: string, b: string, c: string = "Jack") {
console.log(a);
console.log(b);
console.log(c);
}
test("xxx", "yyy", "zzz");
test("xxx","yyy")
有默认值的参数要写在最后
1583

被折叠的 条评论
为什么被折叠?