Tell us what’s happening:
Solution did not work, not sure what is going wrong with my solution
Your code so far
const squad = [];
const firstAstronaut = {
id: 1,
name: "Andy",
role: "Commander",
isEVAEligible: true,
priority: 3
};
// User Editable Region
function addCrewMember(crew, astronaut) {
for(astros of crew){
if (astros.id === astronaut.id) {
console.log("Duplicate ID: " + astronaut.id);
return;
}
// User Editable Region
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0
Challenge Information:
Build a Space Mission Roster - Step 4