const lines = document.querySelector(".lines");
document.querySelectorAll(".items .item").forEach((el) => {
const gH = window.getComputedStyle(el).getPropertyValue("height");
const gB = window.getComputedStyle(el).getPropertyValue("background-color");
const div = document.createElement("div");
div.classList.add("line");
div.style.width = gH;
div.style.backgroundColor = gB;
lines.append(div);
});
Нужно передвать контекст
-this.__proto__.eat.call(this);
+this.__proto__.eat.call(this.__proto__);
repeatCount='indefinite'