const human = {
name: "Heewon",
height: 167,
weight: "secret",
interest: "coding",
}
console.log(human.name);
console.log(human(["name"]);
//객체 안에 내용을 추가하고 싶으면 그냥..아래와 같이 작성하면 끝남.
human.personality = "kind";
console.log(human);
| object | array | |
|---|---|---|
| property 유무 | o | x |
| console 출력방법 | object.property | variable[index] |
| 내용추가방법 | object.newpropertyname = contents | variable.push = contents |