An interview question of js, 1 / 2 / 0 will print out true on the console

1 the true will be printed on the console
1 on the console and the false
ball will be printed out on the console.

Jun.10,2022

problems with JS type conversion

1 : 1 is false, 0 is false
= no type conversion


did not try to print out 1 true . The test browsers are Chrome and IE.

< hr >

the order above is: first 1 = > false , false==3 = > false .

if it is 1==2==false , then the returned result is true


= =: if the value type is the same, naturally print out true
=: if each value is a numeric value and is the same value, it is equal; otherwise, it is not equal.

Menu