Some languages (like rust/zig) allow you to use `if` statements as expressions. Something like:
let x = if (cond) {
value
} else {
value
}
which would make nested conditions much nicer
I still think that’s less clear than this.
let x;
if (expr) {
Do stuff and assign value to x
}
else {
Do other stuff and assign value to x
}
The problem with nesting ternary operations is that you have to build this weird mental model to understand them, rather than just read the code.