[ES6] 기초문법 9 - 객체생성하기
//기본적인방법 const createObject = (name, age, gender) => { return { name : name, age : age, gender : gender }; }; console.log(createObject("gildong", 56, "male")); //간단하게 작성하기 const createObject = (name, age, gender) => ({name, age, gender}); console.log(createObject("gildong", 56, "male"));
2019. 5. 9.