7 ms·
Because 1 !== true and 0 !== false in JavaScript: const index = "Hello HN".indexOf("H") console.log(index); >> 0 index == false >> TRUE index === f
by cmg 3y ago
Because 1 !== true and 0 !== false in JavaScript:
const index = "Hello HN".indexOf("H")
console.log(index);
>> 0
index == false
>> TRUE
index === false
>> FALSE