Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Instruction
Useful JavaScript Object Methods
You've learned that with for...in
, you're able to loop (or iterate) over the properties of an object literal and access each property's value. For example:
const person = {
name: 'Reggie',
role: 'Software developer',
skills: ['JavaScript', 'HTML', 'CSS'],
isTeacher: true
};
for ( let prop in person ) {
console.log(prop);
}
The for...in
loop above calls th...