function createCard(i) {
  const newCard = document.createElement("div");
  newCard.className = "grid";
  newCard.classList.add("card");
  newCard.id = i;
  // create divs for the card information
  const photoDiv = document.createElement("div");
  photoDiv.className = "photo";
  const photoImg = document.createElement("img");
  photoImg.className = "cardPhoto";
  const nameDiv = document.createElement("div");
  nameDiv.className = "name";
  const emailDiv = document.createElement("div");
  emailDiv.className = "email";
  const locationDiv = document.createElement("div");
  locationDiv.className = "location";
  // insert the four elements into the 'newCard' element
  newCard.appendChild(photoDiv);
  photoDiv.appendChild(photoImg);
  newCard.appendChild(nameDiv);
  newCard.appendChild(emailDiv);
  newCard.appendChild(locationDiv);
  return newCard;
}
// function to create a blank employee card
function to create a blank employee card
function to create a blank employee card
function createCard(i) {
  const newCard = document.createElement("div");
  newCard.className = "grid";
  newCard.classList.add("card");
  newCard.id = i;
  const photoDiv = document.createElement("div");
  photoDiv.className = "photo";
  const photoImg = document.createElement("img");
  photoImg.className = "cardPhoto";
  const nameDiv = document.createElement("div");
  nameDiv.className = "name";
  const emailDiv = document.createElement("div");
  emailDiv.className = "email";
  const locationDiv = document.createElement("div");
  locationDiv.className = "location";
  newCard.appendChild(photoDiv);
  photoDiv.appendChild(photoImg);
  newCard.appendChild(nameDiv);
  newCard.appendChild(emailDiv);
  newCard.appendChild(locationDiv);
  return newCard;
}
function createCard ( i ) { const newCard = document . createElement ( "div" ) ; newCard . className = "grid" ; newCard . classList . add ( "card" ) ; newCard . id = i ; const photoDiv = document . createElement ( "div" ) ; photoDiv . className = "photo" ; const photoImg = document . createElement ( "img" ) ; photoImg . className = "cardPhoto" ; const nameDiv = document . createElement ( "div" ) ; nameDiv . className = "name" ; const emailDiv = document . createElement ( "div" ) ; emailDiv . className = "email" ; const locationDiv = document . createElement ( "div" ) ; locationDiv . className = "location" ; newCard . appendChild ( photoDiv ) ; photoDiv . appendChild ( photoImg ) ; newCard . appendChild ( nameDiv ) ; newCard . appendChild ( emailDiv ) ; newCard . appendChild ( locationDiv ) ; return newCard ; }
function to create a blank employee card
function to create a blank employee card
// create divs for the card information // insert the four elements into the 'newCard' element