Object Literal Upgrades
const first = 'snickers';
const last = 'bos';
const age = 2;
const breed = 'King Charles Cav';
const dog = {
first: first,
last: last,
age: age,
breed: breed,
}
console.log(dog);key ์ value์ ์ค์ ๋ name์ด ๊ฐ๋ค๋ฉด!
const first = 'snickers';
const last = 'bos';
const age = 2;
const breed = 'King Charles Cav';
const dog = {
first,
last,
age,
breed,
}
console.log(dog);ํ๋์ ์ด๋ฆ๋ง ๋จ๊ฒจ๋์๋ ๋๋ค.
๋ฉ์๋์์
์ด๋ ๊ฒ ๋ณ๊ฒฝํ ์ ์๋ค.
arrow function์ ์ฐ๋ฉด ์๋๋ค. 'o'
example 1
ํจ์๋ฅผ ํ๋ ์ถ๊ฐํด ๋ณธ๋ค.
example 2
Last updated
Was this helpful?