function populateModal(cardNumber) {
  let modalDetails = populateInfo(randomPeople[cardNumber]);
  let nameDiv = document.getElementsByClassName("nameModal")[0];
  let emailDiv = document.getElementsByClassName("emailModal")[0];
  let locationDiv = document.getElementsByClassName("locationModal")[0];
  let photoDiv = document.getElementsByClassName("cardPhotoModal")[0];
  let phoneDiv = document.getElementsByClassName("phoneModal")[0];
  let addressDiv = document.getElementsByClassName("addressModal")[0];
  let birthdayDiv = document.getElementsByClassName("birthdayModal")[0];
  nameDiv.innerHTML = modalDetails.name;
  emailDiv.innerHTML = modalDetails.email;
  if (emailDiv.innerHTML.length >= 28) {
    emailDiv.style.fontSize = "0.75rem";
  }
  locationDiv.innerHTML = modalDetails.location;
  photoDiv.src = modalDetails.photo;
  phoneDiv.innerHTML = modalDetails.phone;
  addressDiv.innerHTML = modalDetails.address;
  if (addressDiv.innerHTML.length >= 28) {
    addressDiv.style.fontSize = "0.75rem";
  }
  birthdayDiv.innerHTML = modalDetails.birthday;
}
// populate the modal view with the data for the 'clicked on' card id
populate the modal view with the data for the 'clicked on' card id
populate the modal view with the data for the ' clicked on ' card id
function populateModal(cardNumber) {
  let modalDetails = populateInfo(randomPeople[cardNumber]);
  let nameDiv = document.getElementsByClassName("nameModal")[0];
  let emailDiv = document.getElementsByClassName("emailModal")[0];
  let locationDiv = document.getElementsByClassName("locationModal")[0];
  let photoDiv = document.getElementsByClassName("cardPhotoModal")[0];
  let phoneDiv = document.getElementsByClassName("phoneModal")[0];
  let addressDiv = document.getElementsByClassName("addressModal")[0];
  let birthdayDiv = document.getElementsByClassName("birthdayModal")[0];
  nameDiv.innerHTML = modalDetails.name;
  emailDiv.innerHTML = modalDetails.email;
  if (emailDiv.innerHTML.length >= 28) {
    emailDiv.style.fontSize = "0.75rem";
  }
  locationDiv.innerHTML = modalDetails.location;
  photoDiv.src = modalDetails.photo;
  phoneDiv.innerHTML = modalDetails.phone;
  addressDiv.innerHTML = modalDetails.address;
  if (addressDiv.innerHTML.length >= 28) {
    addressDiv.style.fontSize = "0.75rem";
  }
  birthdayDiv.innerHTML = modalDetails.birthday;
}
function populateModal ( cardNumber ) { let modalDetails = populateInfo ( randomPeople [ cardNumber ] ) ; let nameDiv = document . getElementsByClassName ( "nameModal" ) [ 0 ] ; let emailDiv = document . getElementsByClassName ( "emailModal" ) [ 0 ] ; let locationDiv = document . getElementsByClassName ( "locationModal" ) [ 0 ] ; let photoDiv = document . getElementsByClassName ( "cardPhotoModal" ) [ 0 ] ; let phoneDiv = document . getElementsByClassName ( "phoneModal" ) [ 0 ] ; let addressDiv = document . getElementsByClassName ( "addressModal" ) [ 0 ] ; let birthdayDiv = document . getElementsByClassName ( "birthdayModal" ) [ 0 ] ; nameDiv . innerHTML = modalDetails . name ; emailDiv . innerHTML = modalDetails . email ; if ( emailDiv . innerHTML . length >= 28 ) { emailDiv . style . fontSize = "0.75rem" ; } locationDiv . innerHTML = modalDetails . location ; photoDiv . src = modalDetails . photo ; phoneDiv . innerHTML = modalDetails . phone ; addressDiv . innerHTML = modalDetails . address ; if ( addressDiv . innerHTML . length >= 28 ) { addressDiv . style . fontSize = "0.75rem" ; } birthdayDiv . innerHTML = modalDetails . birthday ; }
populate the modal view with the data for the 'clicked on' card id
populate the modal view with the data for the ' clicked on ' card id