Variable Reassignment
By definition, the value represented by a variable may vary, or change, over time throughout the program:
Fig 1:
var s: string = "Hello";
print(s);
s = "goodbye";
print(s);
Output:
Hello
goodbye
By definition, the value represented by a variable may vary, or change, over time throughout the program:
var s: string = "Hello";
print(s);
s = "goodbye";
print(s);
Output:
Hello
goodbye