1. Digitizing People in Phone Book. Question


#1


https://www.codecademy.com/en/courses/building-an-address-book/0/1?curriculum_id=506324b3a7dffd00020bf661


It says that Bob is an associative array, yet based on how Bob is created I would think he's an object. Is associative array an object?


var bob = {
    firstName: "Bob",
    lastName: "Jones",
    phoneNumber: "(650) 777-777",
    email: "bob.jones@example.com"
};

console.log(bob.firstName);
console.log(bob.lastName);
console.log(bob.email);


#2

So we have to use one of JavaScript's minor mysteries.
In JavaScript, objects are also associative arrays (or hashes)

You can read about it here


#3

Thanks, stetim. Very informative article!


#4

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