I am saving arrays to localStorage values to save the values in the arrays to an array in a different javascript file. When I tell it to give the first value of the array, it just gives the first letter of the first value. I know it is the first value because when I display the whole array to a p element, there are no commas between letters.
File setting values:
localStorage.setItem('question-names-array', questionNames)
(questionNames is an array)
File retrieving values:
questionNameDisplay.innerHTML = questionNames[0]
If the first value of questionNames is hello, questionNameDisplay.innerHTML will be ‘h’
Can anyone tell me what I am doing wrong and/or what I can do to fix it?