"We Made a Friend!" Syntax Question



So I'm not really having issues with the code, but I don't understand why this code works. This is the example code that the lesson provides, but based on what I see, this shouldn't output the correct logs. Since we define "firstName","lastName", etc., shouldn't the output be something like:

add("Dec","Ness","decness@ex.com","(555) 555-5555")

Dec: Dec
Ness: Ness
decness@ex.com: decness@ex.com
(555) 555-5555: (555) 555-5555

//example code provided

contacts[contacts.length] = {
    firstName: firstName,
    lastName: lastName,
    phoneNumber: phoneNumber,
    email: email

so why wouldn't that happen?


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