In CSS you might set a property like font-family to a list of comma-separated things and the first thing found is used.
font-family: Fancy Font, Arial, sans-serif;
In Javascript, I've started to grow accustomed to using a double-bar logical OR as a way to set a variable to the first available value.
var x = parameters.x || user_default.x || 123;
the problem I've found is that ||
evaluates 0
as false
which skips over that value. Perhaps it's a pipe dream, but is there an elegant similar syntax I can use without resulting in these false positives?