I think that ternary operator is good, but! not the nested one (spaghetti code...).
I usually use it when I whant to assign a value to a variable based on a criteria.
A Senior Developer working mostly with PHP and JavaScript, with a bit of Python thrown in for good measure, all on Linux. My tooling is simple, it's GitLab and JetBrains where possible.
I think that ternary operator is good, but! not the nested one (spaghetti code...).
I usually use it when I whant to assign a value to a variable based on a criteria.
I agree with you. I just wanted to show that you could do an if, else if, and else with a ternary operator.
Thanks. It looked like you were encouraging people to do it.
I agree that ternary operators have their place, but nesting them in the real world (outside of excel or similar) is just madness