반응형
배열
var memberArray = ['joy', 'jane', 'hana'] ;
console.log("memberArray[2]", memberArray[2]);
-> memberArrya[2] hana
var memberObject = {
manager:'joy',
developer:'jane',
designer:'hanaa'
}
memberObject.designer = 'hana';
console.log("memberObject.designer", memberObject.designer);
-> memberObject.designer hana
console.log("memberObject['designe']", memberObject['designer']);
-> memberObject['designer'] hana
delete memberObject.manager
console.log('memberObjetc.manager', memberObject.manager);
-> 안뜸!!
반응형
'# 02 > JavaScript' 카테고리의 다른 글
[JavaScript] class (0) | 2019.04.25 |
---|---|
[JavaScript] prototype (0) | 2019.04.25 |
[JavaScript] this (0) | 2019.04.25 |
[JavaScript] 객체 만들어 보기 (0) | 2019.04.25 |
[JavaScript] 반복문 (0) | 2019.04.25 |