trying to build a quick game. Whereby the word appears at the top of the page, the users click on the correct antonym. I'm trying to add functionality so the users can add their own word pairs. For example:
var iWords = ['new','tall','hot'];
var btn = document.getElementById('btn');
btn.addListenerEvent('click', function() {
var newWord = prompt('What word do you want to add?');
iWords.push(newWord);
});
The code works perfectly, other than when the page refreshes it initalizes iWords from the global var.
Is there any way to permanently push the added words in?
Many thanks, Tom