Programming, Scala, Data Type, Abstraction, Introduction.
max = b into val max = if(a > b) a else b In a switch case scenario, Scala’s match expressions also return a value so you can change: max match { case 10 => t = "Ten" case _ => t = "Not Ten" } into the following: var t = max match { case 10 => "Ten" case _ => "Not Ten" } Notice the match expression