// 配列の初期化 var arry = {}; // 配列にプロパティを追加 arry["prop1"] = { "name": "val1", "age": 30 }; arry["prop2"] = { "name": "val3", "age": 25 }; // プロパティの削除 delete arry.prop1; // もしくは delete arry['prop1'];
MDN - delete
https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/delete
0 件のコメント:
コメントを投稿