[JS] 객체 key값 동적 할당

민병대·2022년 3월 28일
0
const name = "color";
const person = { [name]: "blue" }; // {color: 'blue'}
profile
마케터 출신 개발자

0개의 댓글