在JS中,Object和Property的删除用法:

 1 var myObject = {name:'jimmy', age:12, height:123}
2 delete myObject["jimmy"];
3 delete myObject.age;
4 with (myObject) { 5 delete height; 6 } 7 8 // and an object 9 var myObject = new Object(); 10 delete myObject; 11 12 var myObj2 = {}; 13 myObj2 = null;

 

相关文章:

  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2021-11-01
  • 1970-01-01
  • 2021-06-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
相关资源
相似解决方案