javascript double exclamation point code example
Example 1: es6 what is double exclamation operator
!oObject // inverted boolean
!!oObject // non inverted boolean so true boolean representation
Example 2: javascript operator double not
// convert to boolean
// The following examples are the only values which result in a false expression
!!0 // false
!!"" // false
!!null // false
!!undefined // false
!!NaN // false
Example 3: javascript double exclamation mark
console.log(navigator.userAgent.match(/MSIE 8.0/));
// returns either an Array or null
Example 4: javascript double exclamation mark
console.log(!!navigator.userAgent.match(/MSIE 8.0/));
// returns either true or false