Is there some way to replace a specific string within a HTML element with another string? I tried using .replace() but there was no effect (and no error message in the console either). See code below.
month = 1
date = document.getElementById('date');
date.innerHTML = month + ' months';
if (month == 1) {
date.innerHTML.replace('months', 'month');
}