// delete 删除
// 语法: boolean delete 数据;
// 在当前作用域上删除数据

// 用法:
// 1, 删除数组中的一个元素
// 2, 删除一个对象的属性或方法
// 3, 删除一个没有用 var 声明 变量

/*
var arr = [ 1, 2, 3, 4 ];
console.log( arr );
console.log( arr.length )
var isTrue = delete arr[ 2 ];
console.log( arr );
console.log( arr.length )
*/

/*
var o = { name: "jim" };
var isTrue = delete o.name; // o[ "name" ]
*/

var n = 1;
m = 2;
var isTrue1 = delete n;
var isTrue2 = delete m;

console.log( isTrue1 ); // => false
console.log( isTrue2 ); // => true

console.log( n ); // => 1
console.log( m ); // => undefined

最新文章

  1. 线程安全的无锁RingBuffer的实现
  2. 用JS控制video暂停再播放
  3. 常用JS效果 需要时更新。。。
  4. object.assign()方法的使用
  5. iOS - (调用系统本机发送短信功能)
  6. Android Handler之Message传递参数
  7. Controller里写自己需要的Action,参数的名字必须和路由设置的参数名一致
  8. 正则表达式匹配(node.js)
  9. 数据(数组,json)的处理
  10. SQL VS NoSQL
  11. 2019-04-29 EasyWeb下配置Atomikos+SQLServer分布式数据源
  12. Lesson 2-2(列表,元组)
  13. Springboot 2.返回cookies信息的get接口开发 和 带cookis去请求
  14. hadoop1.2开发环境搭建
  15. jmeter下TPS插件的安装
  16. python3 线程池-threadpool模块与concurrent.futures模块
  17. JVM异常之:堆溢出OutofMemoryError
  18. mpvue使用scroll-view实现图片横向滑动
  19. [Python] numpy.nonzero
  20. [LearnOpenGL]照相机的变换、坐标系、摄像机

热门文章

  1. CF1000G Two-Paths (树形DP)
  2. malloc 和free例程
  3. win系统安装node出现这个2503和2502解决办法
  4. servlet3.0 @webfilter 过滤顺序
  5. Qt之QTemporaryFile
  6. 新手做2D手游该用哪些工具?
  7. iOS开发- Images can’t contain alpha channels or transparencies 解决的方法
  8. Java - 多线程Callable、Executors、Future
  9. bzoj1800: [Ahoi2009]fly 飞行棋(乱搞)
  10. PostgreSQL Replication之第六章 监控您的设置(3)