摘要:
有两种方法 语法1:let 变量名:类型[] 或 let 变量名:(类型 | 类型)[] 语法2:let 变量名:Array<类型> 或 let 变量名:Array<类型 | 类型> 方法一: let arr1:string[] arr1=['1','2','3'] 或 let arr1:(stri 阅读全文
posted @ 2024-06-14 21:08
light丶
阅读(53)
评论(0)
推荐(0)
摘要:
语法:let 变量:类型 let msg:string msg ='hello ts' msg =200 // 错误或let msg:(string | number)msg ='hello ts'msg =200 阅读全文
posted @ 2024-06-14 21:01
light丶
阅读(34)
评论(0)
推荐(0)

浙公网安备 33010602011771号