obrazek

IE11: Object doesn't support property or method 'forEach'

21.06.2019 by Martin Andráši
      let cars = document.querySelectorAll(".car");
      let carList = "";
      cars.forEach(function(car) {
        carList += car.innerText;
        console.log(car.innerText);
      });

Array.from() have got forEach....

let cars = Array.from(document.querySelectorAll(".car"));

Komentáře

0 komentářů


Kontakt

Napište mi