LocalStorage variables

The documentation states that LocalStorage stores strings and that the key is also a string.

However I have been implementing LocalStorage using integers without an error, such as:


Is the key and data in the above statement being interpreted as a string even though they are not contained in quotes?

Hi, the answer is “yes” - they are always strings. Integers are converted automatically. See this link for details:


Thomas, much appreciated. Tnx.