-4

this is my code:

 function LoadDate() {
    document.querySelectorAll('[display-date]').forEach(el => el.innerHTML = getTheDate());
    }

It is not working on IE because of this arrow (el => ) as I understand from my last question .. how can I convert it to be supported in all browsers?

Thanks for your time ^_^

1 Answers1

0
 function LoadDate() {
    var displayDates = document.querySelectorAll('[display-date]');
    for (var i = 0; i < displayDates.length; i++) {
       displayDates[i].innerHTML = getTheDate()
    }
 }
IceMaur
  • 66
  • 6