DEV Community

Discussion on: Avoid use IF on our JS scripts

Collapse
 
nmobregon profile image
Nicolás Mariano Obregón • Edited

Hi @damxipo !
I'm a ternary fan, but as many said, those nested ternaries are harder to read than the ifs.
I really liked the switch alternative, I'm going to implement it right now.

Please, pleeease, change those vars to let/const :)

Thanks Damian, really good article! Keep it coming

Collapse
 
damxipo profile image
Damian Cipolat

Oh my god is true, my bad. I always use let and I don't know what happened