It's pretty much like saying "If the value of var = the value of var2."
The vertical bar is a simple that means to evaluate or equal to. There are different ways in PHP to call "equal to" functions, and that's one of them.
What!? No the || is an OR logical operator. When you see in what you have there it means only one of the conditions needs to be true for that if statement to be true. To type that on your keyboard you use two pipes. It is usually the key under the backspace key, you may have to hit shift first to get it. It is also normally the backslash key.
It is usually the key under the backspace key, you may have to hit shift first to get it. It is also normally the backslash key.
Keep in mind that there are different keyboard layouts for different languages and operating systems. For me the vertical bar is on the “7” key (with forward slash on Shift) and I have to press Option (a. k. a. “Alt” with the Symbol ⌥) + 7 to write it.
Thanks for the replies, it is good to know what that symbol on the keyboard meant and also what it means in terms of Javascript.
Thank you for those who pointed out my sloppy code - leaving a ) off, even though this was just an example to better explain my question, it shows I need to pay more attention to my writing.
Stephan, you need a less complicated keyboard! lol
Haha! Actually, typing special characters (for my German keyboard layout, e. g. like ç, ñ, ∂, µ, ™) is much simpler on Apple keyboards than on Windows/Unix type keyboards. These special characters are all on one of the regular keys and I only have to press Option or Shift+Option and the key rather than AltGr and some obscure code on the number block.