자바스크립트 delete 연산자

1 개요[ | ]

JavaScript delete 연산자
자바스크립트 delete 연산자
var fruits = {a:'apple',b:'banana',c:'cranberry'};
delete fruits.b;
console.log( fruits );
// {a: "apple", c: "cranberry"}
var fruits = {a:'apple',b:'banana',c:'cranberry'};
delete fruits['b'];
console.log( fruits );
// {a: "apple", c: "cranberry"}
var fruits = ['apple','banana','cranberry'];
delete fruits[1];
console.log(fruits);
// ["apple", empty, "cranberry"]
var fruits = ['apple','banana','cranberry'];
fruits.splice(1,1);
console.log(fruits);
// ["apple", "cranberry"]

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}