Comment Comment by melolife In Scala everything is an expression so you just use an if statement: val foo = if(x) y else z parent melolife 6 years ago