I can't read the &&
part. How does that affect the result of the expression?
_1st == '0' ? TENS[_2nd] : TENS[_2nd] && TENS[_2nd] + '-' || ''
I can't read the &&
part. How does that affect the result of the expression?
_1st == '0' ? TENS[_2nd] : TENS[_2nd] && TENS[_2nd] + '-' || ''
The && is a short-circuited logical "AND" expression. It means that if the first condition is true check the second. If the first is false, stop and report that the overall expression is false.