Logical &&
operator returns true if both or all operands are true:
if (a && b) console.log("Hello");
But today I came across checking for the truthy values in if statement without &&
logical operator:
if ((a, b)) console.log("Hello");
So I'd like to ask, is this also valid way of checking for the truthy values? Also can you please share your thoughts on how is this working?