So i just found out [0] == true is false, and [0] === true is also false, so i assumed [0] should be evaluated to false. But when I am writing
if([0]) {
console.log("hi");
}
prints "hi" That happens because Boolean([0]) returns true. But i think it should have returned false. What am I thinking wrong here?