-1

I have absolutely no idea how this is called which is the reason why my searches failed miserably.

What does this code mean

var a = b || c;

I believe it's something like a will equal which ever is defined but.. I just have to be sure what it exactly does before I use it.

php_nub_qq
  • 15,199
  • 21
  • 74
  • 144

1 Answers1

2

If b is defined, it will use b, if c is defined and b isn't, it will use c. If you put it in parenthesis () it will return true/false.

Blake A. Nichols
  • 870
  • 1
  • 6
  • 11