/*
//강의1
var grades = {
list : {'egoing' : 10, 'k8805' : 8, 'sorialgi' : 80}
show : function(){
for(var name in this.list){
console.log(name, this.list[name]);
}
}
}
grades.show();
//배열과 객체의 유사성
const array = [100, 20, '문자열', true, function(){},()=>{}]
console.log(array[0])
array[0] = 200
console.log(array[0])
const object = {
name: '동연',
age: 30
}
console.log(Object.name)
//내용을 변경하고 싶다면
object.name = '지은'
object.age = 6
console.log(object.name)
console.log(object.age)
const human = {
name: '동연',
age: 30
cool: function() {
console,log('${object.name}이 날뜁니다')
}
eat: () =>{
console.log('${object.name}이 먹습니다')
}
}
human.coll()
human.eat()
*/
//객체의 키와 값을 정적으로 생성한다 (초기값)
const human = { //const지만 heap 영역에 있기떄문에 내부요소 변경가능
name: '동연'
age: 30
}
//객체의 키와 값을 동적으로 생성한다
human.color = 'red'
//객체의 키와 값을 동적으로 생성한다
//delete 연산자
delete.human.clor
//출력
console.log();