Js in progress !! The role is :!! It is generally used to convert the following expression to a boolean data (boolean) js !! The role is:
!! It is generally used to convert the following expression to a boolean data (boolean)
=== Indicates that all the types and other items are equal (just write an if test by yourself)
! = Indicates that you want to include all types (write an if statement as well)
| Or
!! It is generally used to convert subsequent expressions to boolean data (boolean) Because javascript is a weak language (the variable does not have a fixed data type), it is sometimes required to be forcibly converted to the corresponding type,
For example, a = parseInt ("1234") a = "1234" + 0 // convert it to a number B = 1234 + "" // convert it to a string c = someObject. toString () // convert an object to a string, of which 1st and 4th are Explicit conversions,
2. 3 refers to implicit conversion of boolean type. The javascript Convention is similar to c, the rule is: false, undefinded, null, 0, "" is false, true, 1, "somestring", and [Object] is true.