1. 프로퍼티 값 단축 구문(property -value -shorthand)
var id = 'p-0001';
var price = 30000;

// 기존 생성 방식
var product = {
    id : id,
    price : price
};
// ES6 단축 구문
var product2 = { id, price };
  1. 계산된 프로퍼티 이름(computed -property -name)
var prefix = 'key';
var index = 0;

var obj = {};

obj[prefix + '-' + index++] = index;
obj[prefix + '-' + index++] = index;
obj[prefix + '-' + index++] = index;
console.log(obj);  //{ 'key-0': 1, 'key-1': 2, 'key-2': 3 }
  1. 메소드 단축(method -shorthand)
var dog2 = {
    name : '두부',
    eat(food) {  // function 생략
        console.log(`${this.name}(은)는 ${food}를 맛있게 먹어요.`);
    }
}