!!:一般用来将后面的表达式强制转换为布尔值(boolean):true或者false;

avascript约定规则为: 
  false、undefinded、null、0、”” 为 false 
  true、1、”somestring”、[Object] 为 true

所以:

  !false    !undefinded    !null    !0     !""    为true

  !!false   !!undefinded   !!null   !!0    !!""   为false

  !true     !1     !"somestring"     ![Object]  为false

  !!true    !!1    !!"somestring"    !![Object] 为true

最新文章

  1. 对比Haproxy和Nginx负载均衡效果
  2. php 时间加减
  3. Xcode6 storyboard new push segue 后的视图控制器没有navigation item bug.
  4. linux---mysql安装
  5. ABAP 加密解密程序
  6. Spring MVC3返回JSON数据中文乱码问题解决(转)
  7. BZOJ [ZJOI2008]泡泡堂BNB 贪心
  8. Zepto源码笔记(三)
  9. Twisted No module named win32api
  10. react基础(2)
  11. Codefroces 850C Arpa and a game with Mojtaba
  12. 优秀设计师应当知道的20大UI设计原则
  13. Appium could not connect to server are you sure it's running appium desktop
  14. 发布自己的类库到NuGet
  15. 关于npm的坑
  16. django session 的简单操作
  17. Docker容器管理及代码调用
  18. windows10 下安装tensorflow 并且在jupyter notebook 上使用tensorflow
  19. vue 之 Vue.extend()
  20. form表单转化json对象

热门文章

  1. 【刷题笔记】LeetCode 606. Construct String from Binary Tree
  2. 使用右键打开Visual Code
  3. Habernate配置一对一,一对多,多对多(二)
  4. win32应用禁止改变窗口大小方法
  5. javaweb 之 工具类UUIDUtils
  6. Windows环境下配置thrift编译器(VS2015)
  7. jquery.zclip.js复制到剪切板
  8. uva 11624 Fire! 【 BFS 】
  9. JS一个经典闭包问题
  10. debian 9 添加源