Orual
Yeah one of my favourite little features of Rust. `let ... if` is also super good, not sure if JavaScript has that one.
1 2
Samuel
@samuel.fm
ah right cause implicit returns and if expressions. neat!
1 2
Orual
Yeah, 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