JS Some if statement to determine the condition is fasle case
Prior to write an if judgment condition produced by the bug, when the Write logic processing data is in the background to the interface before, so I developed a field value of number type 0 or one to judge, the last interface comes out of the time is a string, whether 0 or 1 is true. Number of type 0, the Boolean value is false,string type of 0, and the Boolean value is true. So here's a case where you want to count some data types for conditional judgments.
Here you can see the empty string as the result of the judgment is false
Here you can see that the number type is only 0 as the judgment result is false
Here you can see NaN, undefined, and null as a result of false
Here a method is added to determine if the variable is undefined typeof b = = "undefined" If undefined return result is true, the defined result is false
JS Some if statement to determine the condition is fasle case