Jonathan Hsu
1 min readOct 19, 2019

Kristian, I had that same opinion for a long time when I first learned of the operator. I challenged myself to try using it and I’ve found there are times where it’s helpful.

I can read code faster with it because I can see more lines of code together. Especially when I need to do a group of assignments in sequence… five ternary operator guided assignments is 5 lines rather than ~25 with the way I write if/else blocks.

Ultimately it comes down to personal style but I completely understand your opinion on the matter.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response