const caption = document.createElement('p'); caption.textContent = photo.caption;

Verified by MonsterInsights