Last JS newbie of the day ... object iteration

Final one today ... my brain is melting now.

Within the for...in execution crewMember is placed within square brackets, [].
What are they doing to crewMember.
If I've understood it right, the statement refers to crewMember because it is a variable saving the spaceship.crew property for each iteration. But I still don't understand what the square brackets are making the crewMember into? The only guess I have is a property value, but I don't really understand ...

let sppaaceshipp = {
    crew: {
        captain: {
            name: 'Lily',
            degree: 'Computer Engineering',
            cheerTeam() { console.log('You got this!') }
        },
        'chief officer': {
            name: 'Dan',
            degree: 'Aerospace Engineering',
            agree() { console.log('I agree, captain!') }
        },
        medic: {
            name: 'Clementine',
            degree: 'Physics',
            announce() { console.log(`Jets on!`) }
        },
        translator: {
            name: 'Shauna',
            degree: 'Conservation Science',
            powerFuel() { console.log('The tank is full!') }
        }
    }
};

for (let crewMember in sppaaceshipp.crew) {
    console.log(`${sppaaceshipp.crew[crewMember].name}: ${sppaaceshipp.crew[crewMember].degree}`)
};
// Prints:
// Lily: Computer Engineering
// Dan: Aerospace Engineering
// Clementine: Physics
// Shauna: Conservation Science
Was this page helpful?