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

Stop nesting ternaries in JavaScript

www.sonarsource.com

external-link
message-square
34
link
fedilink
32
external-link

Stop nesting ternaries in JavaScript

www.sonarsource.com

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

    Your probably right, that looks quite desirable.

JavaScript

javascript

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.

  • 7 users / day
  • 26 users / week
  • 39 users / month
  • 288 users / 6 months
  • 673 local subscribers
  • 2.34K subscribers
  • 159 Posts
  • 366 Comments
  • Modlog
  • mods:
  • Erlingur
  • Ategon
  • nick
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org