Do you know what will be the output of this code?
JavaScript
console.log("a" && "b");
Show answer and explanation
The answer is "b".
&& returns the first falsy operand. If every operand is truthy, it returns the last one. Both strings are truthy, so the result is "b".