let a = 'abc';
let b = "def";
單引號「''」不可使用地方是:
ex:
let c = 'let's go';
這樣會報錯,如圖:
let friendName = 'Tom' ;
let greeting = '你吃飯了嗎?';
let total = friendName + ' '+greeting;
console.log(total);
ans:
"Tom 你吃飯了嗎?"
let friendName = 'Tom' ;
let greeting = '你吃飯了嗎?';
let total = friendName + ' '+greeting;
console.log(typeof friendName);