[0.002s][warning][perf,memops] Cannot use file /tmp/hsperfdata_runner/3 because it is locked by another process (errno = 11)

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