Originally Posted by Old Pedant
So if setItem seems to work for you just change
localStorage.current_player = "player_turn_value";
localStorage.setItem('current_player') = player_turn_value;
*STOP PUTTING QUOTES* AROUND VARIABLE NAMES!
One more time: "player_turn_value" is the *STRING* player_turn_value
. AS IS. No substitution.
If you used that, then when you later did localStorage.getItem('current_player')
all you would get is THAT SAME STRING. You would *NEVER* get values such as player_3
Hmm... still getting an error that it can't get the value of the property 'player_turn'