📌  相关文章
📜  javascript 字符串格式 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:51.638000             🧑  作者: Mango

代码示例6
let name = "John";
let age = 30;
let food = "pizza";

// String formating using backticks
let sentence = `${name} is ${age} years old and likes ${food}`;

console.log(sentence); // John is 30 years old and likes pizza