1

I can't read the && part. How does that affect the result of the expression?

_1st == '0' ? TENS[_2nd] : TENS[_2nd] && TENS[_2nd] + '-' || ''
j08691
  • 190,436
  • 28
  • 232
  • 252
user2585040
  • 65
  • 1
  • 9

1 Answers1

3

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.

Scott Marcus
  • 57,085
  • 6
  • 34
  • 54