For example, in Python, if I do 0 and 2 it would return 0 instead of False.
In JavaScript, if I do "Hello" || "world" it would return "Hello" instead of true.
Aren't logical operators supposed to return a boolean value?
For example, in Python, if I do 0 and 2 it would return 0 instead of False.
In JavaScript, if I do "Hello" || "world" it would return "Hello" instead of true.
Aren't logical operators supposed to return a boolean value?