DEV Community

loading...

Discussion on: Why I'm phasing out ternary statements

Collapse
anssip profile image
Anssi Piirainen

Completely agree with this. I always use const and resort to a mutable variable only if I cannot find a way around it. Variables that can be mutated add mental load and make the program harder to follow.

Collapse
mcgurkadam profile image
Adam McGurk Author

That’s definitely fair!!

Thanks for reading!