I dont know what went wrong


#1

I don't understand why this isn't working. When i run it it should create a new person then add it to my contacts array. when i run it it just gives me an error message saying:

var add = function(firstName, lastName, phoneNumber, email)
{
    var newGuy = new Person(prompt("name"), prompt("name2"), prompt("number"), prompt("mail"))
    contacts[contacts.length] = newGuy
    console.log(newGuy)
}

add()

#2

... saying what? Please post the error message and a link to the exercise. Thanks.


#3

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