let
const 한 variable 을 지정할 때 사용
let a = 1, b=2
Template literals
var a = 5;
var b = 10;
console.log(`Fifteen is ${a + b} and\nnot ${2 * a + b}.`);
for...of
let iterable = [10, 20, 30];
for (let value of iterable) {
console.log(value);
}
class
class Polygon {
constructor(height, width) {
this.name = 'Polygon';
this.height = height;
this.width = width;
}
}
댓글 없음:
댓글 쓰기