The browser storage localStorage is not available. Either your browser does not support it or you have disabled it or the maximum memory size is exceeded. Without localStorage your solutions will not be stored.

Assign variables

A variable can be assigned the value of another variable.
var name1 = 'Olga';
var name2 = name1;
name1 = 'Clara';
In the second line, name2 is assigned the value of name1. The variable name2 gets the value 'Olga'. This value is retained by name2, even if name1 receives a new value afterwards.

Exercise

Which value does x have after execution of the following code?
var x = 'Laurel';
var y = 'Hardy';
var z = y;
y = x;
x = z;
'Hardy'