Contact list>3. friends[bill] = {} AND friends[bill] = new Object() are not accepted as correct and throw 'bill not defined' error


#1

Literal notation with [] for bill ad steve objects doesn't work and throws 'bill is not defined error'

https://www.codecademy.com/courses/javascript-beginner-en-3bmfN/0/3?curriculum_id=506324b3a7dffd00020bf661#


Throws bill is not defined error


var friends = {
    bill: {},
    steve: {}
};

friends[bill] = {};
friends[steve] = {};


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.