In conditions (if, while, ternary), JavaScript coerces values to booleans. Knowing the 5 falsy values prevents logical errors — especially with 0 and empty strings, which are valid values but evaluate ...
JavaScript doesn't care about how you are passing them in, whether as a value directly or as a variable. In this function, JavaScript will take whatever was passed in the first argument and make it ...