IE11 + JS: SCRIPT1004: Предполагается наличие ';'

Что не нравится IE11?

var jsFunctionLinks = document.querySelectorAll('[class="js-function-copytocb"]');
for (let jsFunctionLinksElem of jsFunctionLinks) {
  var jsFunctionLinksElemID = jsFunctionLinksElem.getAttribute('id');
  jsFunctionLinksElem.setAttribute('href', 'javascript:tbCopyToClipboard("' + jsFunctionLinksElemID + '")');
}

Ошибка райзится во 2 строке на 30 символе, в конструкции for (let jsFunctionLinksElem of jsFunctionLinks){}


Ответы (1 шт):

Автор решения: Сергей Мельников

Спасибо за комментарии, по вашим подсказкам сделал так:

Array.prototype.forEach.call(jsFunctionLinks, function (jsFunctionLinksElem) {
  var jsFunctionLinksElemID = jsFunctionLinksElem.getAttribute('id');
  jsFunctionLinksElem.setAttribute('href', 'javascript:tbCopyToClipboard("' + jsFunctionLinksElemID + '")');
});
→ Ссылка