6/6, correct result, but keeps giving me error


#1

Following is my code:

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

var mary = {
    firstName: "Mary",
    lastName: "Johnson",
    phoneNumber: "(650) 888-8888",
    email: "mary.johnson@example.com"
};

var contacts = [bob, mary];

function printPerson(person) {
    console.log(person.firstName + " " + person.lastName);
}

var list = function () {
	var contactsLength = contacts.length;
	for (var i = 0; i < contacts.length; i++) {
		printPerson(contacts[i]);
	}
}
var add = function(firstName, lastName, email, phoneNumber) {
this.firstName = firstName,
this.lastName = lastName,
this.email = email,
this.phoneNumber = phoneNumber
};


contacts[contacts.length] = new add("Arhum", "Ishtiaq", "arhumishi@gmail.com", 03342232925);
list();

Following is the error:

Make sure that the list() function still exists! Your code threw the following error when checking if you called list(): Error: Line 50: Unexpected token ILLEGAL


#2

Prefixing a number with 0 makes it an octal number literal, octal only has the digits 0-7 so 9 can't be in that literal.
Did you mean to put a string there instead?