79073780

Date: 2024-10-10 09:54:53
Score: 1.5
Natty:
Report link

The problem you are facing is most probably because of arrayOfWord.pop() method in function remove. You are assigning the value of arrayOfWord.pop() to words.innerHTML , which eventually returns the deleted element not the the whole array.

To fix this issue you can think of another approach like re rendering the whole array as updated result Use pop method but don't render it to your page . Hope this will work for you

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rubidium