Define var x = 1. Now define val y = x and val z = y. Next, assign 2 to x and display the values of all three identifiers on different lines: first x, then y, then z.
var x = 1
val y = x
val z = y
x
y
z