DEV Community

Discussion on: Some Things About JSON That You May Have Missed

Collapse
petergabriel2 profile image
PeterGabriel2 • Edited on

Absolutely wrong! In every case is switch more readable than joined or/and superlongline. More easy to update. And you will not make error in it so easily like in bunch of writeonly code you just wrote.

Collapse
aumayeung profile image
John Au-Yeung Author

I think ternary operator shouldn't be nested. It's harder to read than if or switch like you said.