Orual25 Jun 2024Yeah one of my favourite little features of Rust. `let ... if` is also super good, not sure if JavaScript has that one. 1 2
Orual25 Jun 2024Yeah, so long as you have an else block that's the same type, you can define/assign to a variable that way. Certain ways of chaining them are currently unstable, but lots of flexibility. Kotlin also does this, btw. 1