operators - || in javascript -


can please tell me || doing here

(function() { window.myapp = window.myapp || {}; window.myapp.lang = window.myapp.lang || {}; myapp.lang.extend = function(subclass, superclass) { subclass.prototype = new superclass(); }; })(); 

window.myapp = window.myapp || {}; 

it means: create window.myapp empty object if not exist.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -