card.forEach( (itemCard, index) => {
itemCard.addEventListener('click', (item) => {
cardPopup.classList.remove('active');
setTimeout(() => {
cardPopup.classList.add('active')
cardPopup.innerHTML = `
<div class="card__popup-close" onclick="cardPopupCloseFun()"></div>
<div class="card__popup-image">
<img src="${arrayOfCards[index].image}" alt="">
</div>
<div class="card__popup-info">
<h2 class="card__popup-name">${arrayOfCards[index].name}</h2>
<p class="card__popup-title">${arrayOfCards[index].title}</p>
</div>
`;
}, 300)
})
})