백틱을 사용해 간편화한것이 '템플릿 문자열'이다.
ex) 안녕 잘가
let string1 = "안녕";
let string2 = "잘가";
let greeting = string1 + " " + string2;
ex) 안녕 잘가
let string1 = "안녕";
let string2 = "잘가";
let greeting = `${string1} 그리고 ${string2}`;
ex) 1 더하기 2는 '3'
let num1 = 1;
let num2 = 2;
let result = 3;
let string1 = num1 + " 더하기" + num2 + "는 '" + result + "'";
console.log(string);
ex) 1 더하기 2는 '3'
let num3 = 1;
let num4 = 2;
let result2 = 3;
let string2 = `${num3} 더하기 ${num4}는 '${result2}'`;
console.log(string2);