I know how to replace text inside a given div:
document.getElementById("containerID").innerHMTL = "some new text";
But I want to change text depending on text that is in an array.
So I have an array:
'Good' : 'Bad',
'Happy' : 'Sad',
How can I change the text in a div with the key of the array? So if my div contains the word good I want to change it to bad.