I came across this code at school
var CAR = ' |8|9|10|11|12|13|15|16|';
I understand that this is a variable named car, but I don't understand how it's being initialized or what it means.
I came across this code at school
var CAR = ' |8|9|10|11|12|13|15|16|';
I understand that this is a variable named car, but I don't understand how it's being initialized or what it means.
It's a pipe |
character, and in your case it has absolutely no meaning. You have a string literal, and the text is literally |8|9|10|11|12|13|15|16|
.
It's a bitwise OR when used outside the context of a string. In your case, it's inside a string, so it's probably being used somewhere else in the code as a delimiter of numeric values. ie - 8,9,10,etc.