3 ms·
If it returns a value then wouldn't it be an if expression, not an if statement? It certainly sounds like a useful feature, as someone who writes a lot of Java
by underwater 8y ago
If it returns a value then wouldn't it be an if expression, not an if statement?
It certainly sounds like a useful feature, as someone who writes a lot of JavaScript I can see the value (and I believe a form of this is coming to JS in the form of `do` expressions).
- rad_gruchalski 8y agoIn Ruby, everything is an expression. I also miss Ruby’s unless in many languages.