Open sprewell20051116 opened 7 years ago
結果是要用這個符號 "`" 左上角 1 左邊的那個按鍵。
- let a = "good";
+ let a = `good`;
- let greeting_41 = "good morning";
+ let greeting_41 = `good morning`;
- let greeting_41_2 = "${a} morning";
+ let greeting_41_2 = `${a} morning`;
console.log(a);
console.log(greeting_41);
console.log(greeting_41_2);
就可以成功輸出
good
good morning
good morning
最後輸出
課程中希望是可以使用 ${a} 來替代前面已經宣告過的
let a = "good"
但是卻沒有成功