Literal

00_8_3·2020년 9월 20일
0

Literal 문법

var a = 5;
var b = 10;
console.log("Fifteen is " + (a + b) + " and\nnot " + (2 * a + b) + ".");
// "Fifteen is 15 and
// not 20."
var a = 5;
var b = 10;
console.log(`Fifteen is ${a + b} and not ${2 * a + b}.`);
// "Fifteen is 15 and
// not 20."

출처 : https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals

0개의 댓글