Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- JavaScript
- spread operation
- Python #Baekjoon
- 카카오맵 api
- Next
- Python
- CSS
- react
- BOJ
- Template literals
- 프로그래머스
- Redux
- Python #CodeUp
- Nullish Coalescing Operator
- React Kakao map
- es11
- HTML #CSS
- firebase
- Default parameter
- HTML
- React #Hooks
- optional chanining
- es6
- Hooks
- css #html
- 카카오맵
- nextjs
Archives
- Today
- Total
거북이개발자
[ES6] Shorthand property names 본문
1. Shorthand property names
(1)일반적 객체생성시
const name='Ryu';
const age=18;
const student1={
name : name,
age : age,
};
이런식으로 name : name처럼 작성해준다.
(2) shorthand prorperty names
const name='Ryu';
const age=18;
const student2={
name,
age,
};
간편하게 name, age로 작성이 가능하다.
결과값이 같은걸 볼 수 있다.
'Web > ES6' 카테고리의 다른 글
[ES11] Optional chaining (0) | 2021.02.07 |
---|---|
[ES6] Template Literals (0) | 2021.02.07 |
[ES6] Default parameters (0) | 2021.02.07 |
[ES6] Spread Syntax (0) | 2021.02.07 |
[ES6] Destructuring Assignment (0) | 2021.02.07 |
Comments