향상된 객체 리터럴이란 기존 JS 객체 정의 문법 작성 방식을 좀 더 간결하게 사용 할 수 있도록 객체 정의 방식을 개선한 문법이다.
var dictionary = {
lookup : function(){
console.log('found something!!');
}
}
dictionary.lookup(); // found something
var dictionary = {
lookup() {
console.log('found something');
}
}
dictionary.lookup(); // found something
var figures = 10;
var dictionary = {
figures : figures,
}
var figures = 10;
var dictionary = {
figures,
}