Possible Duplicate:
What does this construct mean?
I’m encountering this syntax for the first time and am not sure what it’s doing:
self.name = _searchString(settings.dataBrowser) || "An unknown browser";
What does the or (double pipes) condition do? When would self.name be set to the second value?
This is the logical
oroperator.It evaluates to its first “truthy” operand.
In particular, it will evaluate to the second operand if the first operand is “falsy” —
null,false,undefined,0,"", orNaN.