Possible Duplicate:
In Javascript, what does it mean when there is a logical operator in a variable declaration?
Stumbled across this code online, have no idea what it does, wasn’t able to find out with FireBug either, and I can’t google it because of the special characters…
var myValue = myInput.value || 0;
if
myInput.valueis undefined (or another falsy value) then the default value of0will be setsome examples…