In the following function, with a method inside of it called newlastname :
function person(firstname,lastname,age,eyecolor)
{
this.firstname=firstname;
this.lastname=lastname;
this.age=age;
this.eyecolor=eyecolor;
this.newlastname=newlastname;
}
function newlastname(new_lastname)
{
this.lastname=new_lastname;
}
In the line this.newlastname=newlastname; what is happening? What does the first newlastname refer to? I appreciate any tips or advice.