var imgContainer = document.getElementById('response-container') function filling(line){ const Container = `` imgContainer.innerHTML += Container } function Fill(){ fetch('imgs.txt') .then(response => response.text()) .then(data => { readFile(data) }) .catch(error => { console.error('Ошибка:', error); }); } async function readFile(file) { console.log(file); const arr = file.split(/\r?\n/gm) arr.map(line => filling(line)) console.log('done') imgContainer.innerHTML += `