Content Warning

This website contains age-restricted materials including nudity and explicit depictions of sexual activity.

By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.

Lemmy NSFW
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
philnash@programming.dev to JavaScript@programming.devEnglish · 1 year ago

Stop nesting ternaries in JavaScript

www.sonarsource.com

external-link
message-square
33
link
fedilink
29
external-link

Stop nesting ternaries in JavaScript

www.sonarsource.com

philnash@programming.dev to JavaScript@programming.devEnglish · 1 year ago
message-square
33
link
fedilink
Nesting ternary operators makes code more complex and less clear. Let's investigate other ways to write conditional expressions.
  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Your probably right, that looks quite desirable.

JavaScript@programming.dev

javascript@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 21 users / week
  • 36 users / month
  • 258 users / 6 months
  • 4 local subscribers
  • 2.34K subscribers
  • 160 Posts
  • 330 Comments
  • Modlog
  • mods:
  • Erlingur@programming.dev
  • Ategon@programming.dev
  • nick@programming.dev
  • UI: 0.19.11-nsfw
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org