3 ms·
What do you mean? false isn’t true in JavaScript.
by nailer 1y ago
What do you mean? false isn’t true in JavaScript.
- Filligree 1y ago“false”, not false. So there’s odd type coercion, but the problem is that it can happen without you asking for it. Python does the same thing. I don’t like it there either, but at least it’s more consistent about it.
- astura 1y agoThe string with the value of "false" evaluates to true. In other words If ("false") { /* You will be here */ }