Possible Duplicate:
What does “var FOO = FOO || {}” mean in Javascript?
I am finding this kind of statement in javascript object creation repeatedly.
var MyObj = MyObj || {};
Could some one could explain the significance of the above statement?
why can't we create just
var MyObj = {};
Thanks.