Use (! + "\ V1") determines whether it is an Internet browser or a v1ie
I saw it on the yiniu blog (! + "\ V1"). Then, immediately find du Niang and find the answer.
It is actually a bug that uses ie.
In IE browser, "\ v" is not escaped and the result is "v"
In other browsers, "\ v" indicates a vertical tab (to some extent, it is equivalent to a space)
Therefore, the "\ v1" parsed by ie is "v1"
Other browsers resolve "\ v1" to "1"
Add "+" to the front to convert the string to a number.
Because ie considers "\ v1" as "v1", adding the plus sign in front of it cannot be converted into a number, which is NaN
Other browsers can be changed to 1
In js, numbers can be used for logical judgment, and 0 is false, and other numbers are true.
So! 1 = false, so all other browsers return false
Js returns false when encountering the following values: undefined, null, NaN, So ie! NaN = true