我正在寻找一种使用 javascript 代码检测当前浏览器的方法,并遇到了提到的答案 here at the same forum .
我的问题是: !!
的含义是什么? (双感叹号)。
值 !!document.documentMode
返回一个 bool 值,具体取决于当前浏览器是否为 IE,值 document.documentMode
返回 IE 浏览器的版本。
我想了解什么!!
实际上表示。
最佳答案
<小时/>So !! is not an operator, it's just the ! operator twice.
!oObject //Inverted boolean
!!oObject //Non inverted boolean so true boolean representation
关于javascript - 的意思 !!在 JavaScript 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33101434/