[javascript] JS: iterating over result of getElementsByClassName using Array.forEach