Possible Duplicate:
Javascript Shorthand - What Does the '||' Operator Mean When Used in an Assignment?
var variable = obj1 || obj2;
Does it mean this?
var variable;
if (obj1)
{
variable = obj1;
}
else if (obj2)
{
variable = obj2:
}
Is it considered bad practise?