For ( var variable in object ) [7. Search for a friend]


#1

UNIT 6: DATA STRUCTURES \ Lesson: Contact List \ 7. Search for a friend
https://www.codecademy.com/en/courses/javascript-beginner-en-3bmfN/0/7?curriculum_id=506324b3a7dffd00020bf661

I'm having difficulty understanding why the for loop necessitates creating and using a variable within its conditional brackets.

for ( var WhyDoWeCreateA"key"Here? in object )

Can somebody please explain to me why the "key" is necessary?

Thanks


#2

This post was flagged by the community and is temporarily hidden.