= 2 // modifying a data structure in place map(“foo”) = “bar” // setting a field on an object cup.price = 12 // throwing an exception or halting with an error throw new Exception(“caused error”) 139݄9݄༵
println(“hello”) // reading from or writing to a file Source.fromFile(“foo.txt”).mkString // Drawing on the screen def draw() = { // write to screen ... } 139݄9݄༵