TypeScript 第三章 參數默認值,可選參數

1.參數默認值 【1】不帶默認值參數的方法javascript function test4(a:string,b:string,c:string){ console.log(a); console.log(b); console.log(c); } test4("xxx","yyy","zzz"); //此處必須傳三個參數 【2】帶默認值參數的方法,默認值參數必定要聲明
相關文章
相關標籤/搜索