boolean - javascript, what this condition means? if(display || true){...} -


the display variable optional on actual function, don't understand means || true

what checks condition? if(display || true){...}

if(display || true){ $("#container").html(this.displayreport(this.tabdata, extrainfo || false)); } 

the || logical or operation, means display or true true.

your code means if(true) {...}, , if quite redundant.


Comments

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -