From 3b92f0b2de411c74251ed1c674d4ab15ac953bd3 Mon Sep 17 00:00:00 2001 From: Starr Date: Mon, 16 Aug 2021 20:42:19 -0400 Subject: [PATCH] Bonus mission #3 completed --- script.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/script.js b/script.js index ffd0176..207a905 100644 --- a/script.js +++ b/script.js @@ -7,18 +7,23 @@ window.addEventListener("load", function () { .then(function (astronauts){ let container = document.getElementById("container"); container.innerHTML+= ` +

Number of Astronaunts on Mission: ${astronauts.length}

\ + ` + for (let i=0; i
-

${astronauts[0].firstName} ${astronauts[0].lastName}

+

${astronauts[i].firstName} ${astronauts[i].lastName}

    -
  • Hours in space: ${astronauts[0].hoursInSpace}
  • -
  • Active: ${astronauts[0].active}
  • -
  • Skills: ${astronauts[0].skills}
  • +
  • Hours in space: ${astronauts[i].hoursInSpace}
  • +
  • Active: ${astronauts[i].active}
  • +
  • Skills: ${astronauts[i].skills}
- + - ` + + ` } }) })