使用双引号 "
或单引号 '
来表示字符串。
关键字:string
let str: string = 'hello, world'
let res: string = "hello, world"
编译成js:
var str = 'hello, world';
var res = "hello, world";
<
使用双引号 "
或单引号 '
来表示字符串。
关键字:string
let str: string = 'hello, world'
let res: string = "hello, world"
编译成js:
var str = 'hello, world';
var res = "hello, world";
<