LoginSignup
1
0

More than 5 years have passed since last update.

JavaScript  学習記録 (文字列 連結 ES6)

Posted at

文字列の連結 書き方 ES6

${}と`(バッククオート)を利用して文字列の連結を行う事が出来る

// +を使った書きかた
let str1 = "Canada";
console.log("I am living " + str1);
// // I am living Canada

//${}と`(バッククオート) を使った書きかた

let str2 = "Japan";
console.log( `I am living ${str2}`);
// I am living Japan
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0