自动拆分字符串
function test (tpl:any,name:string,age:number) {
console.log(tpl);
console.log(name);
console.log(age);
}
let myname: string = 'xiaohong';
let age: number = 20;
test`123${myname}and${age}`;
image.png
自动拆分字符串
function test (tpl:any,name:string,age:number) {
console.log(tpl);
console.log(name);
console.log(age);
}
let myname: string = 'xiaohong';
let age: number = 20;
test`123${myname}and${age}`;
image.png
本文标题:3.自动拆分字符串
本文链接:https://www.haomeiwen.com/subject/yswysqtx.html
网友评论