I'm having a bit of trouble understanding what the assignment operator is used for when dealing with methods, functions, etc. Here is the example in w3 school for defining an object
function person(firstname,lastname,age,eyecolor){
this.firstname=firstname;
this.eyecolor=eyecolor;
this.newlastname=newlastname;
}
and this is the actual function (place somewhere else)
function newlastname(new_lastname){
this.lastname=new_lastname;
}
It's just very weird to me throughout javascript, you say
object.methodname = somefunctionname
Any ideas to help me conceptualize it?