window.addEventListener('DOMContentLoaded', myFunc);
`
<div class="home-item__points">
${arr.map((item) => `
// Начало foreach
<div class="home-point">
<ul>
<li><span>MOW – HKT</span><span>10:45 – 08:00</span>
</li>
<li><span>В пути</span><span>21ч 15м</span>
</li>
<li><span>1 пересадка</span><span>HKG</span>
</li>
</ul>
</div>
// Конец foreach
`).join('')}
</div>
`
setTimeout(() => {
win.close();
}, 100)
In most browsers, this method will block while the print dialog is open. However in more recent versions of Safari, it may return immediately