Why can't I use crewMember.name?

so i was wondering what s the point of making the variable in the for in loop. like couldnt i have just put no variable instead of specEd, maybe im not getting the significance of the variable in this for in loop…

for(let specEd in spaceship.crew){
console.log(${spaceship.crew[specEd].name}: ${spaceship.crew[specEd].degree})
}

like why doesnt this work?
for(let specEd in spaceship.crew){
console.log(${spaceship.crew.name}: ${spaceship.crew.degree})
}