Mistři v programování na #hovnokod

a dalo se to napsat zloziteji?

(actions.includes("EDIT_ACTION") || actions.includes("SHOW_ACTION") || actions.includes('CREATE_ACTION')) ? this.showComponent = true : '';
(actions.includes("EDIT_ACTION") || actions.includes('CREATE_ACTION')) ? this.showButtonSave = true : '';
actions.includes("SAVE_ACTION") ? this.allowSave = true : '';

if(actions.includes("EDIT_ACTION") || actions.includes("SHOW_ACTION") || actions.includes('CREATE_ACTION') || actions.includes("SAVE_ACTION")) {
	this.showTab = true;
} else {
	this.showTab = false;
}

Anonymous,


Anonymous,

V JS je vsetko mozne...utrzok kodu z code review :D

switch (true) {
  case windowWidth > 840 && windowWidth < 950:
    return 1;
  case windowWidth < 400:
    return2;
  default:
    return 3;
}

Anonymous,

...alebo ako zakomentovat javascript

/* <!-- reklamy AdSense -->
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({
          google_ad_client: "ca-pub-XXXXXXXXXXXXX",
          enable_page_level_ads: true
     });
</script> */

Anonymous,


Anonymous,