Well I don't completely understand


I don't understand the: this.prop
what does it mean in english terms and why do u have for example: this.name = name;
does it mean in english this name is equal to name i dont really understand can someone explain it through english and then explain it with javacscript please

function Person(name,age) {
this.name = name;
this.age = age;


I think it means that anything.name=name!


In terms of Object Oriented Programming, after you declare a class (this would be considered a blueprint),
you can then make an object from this 'blueprint'.

since you dont know what the variable will be... using this.name in a class will keep this method as a blueprint when you create an new object...

function Person(name,age) {
this.name = name;
this.age = age; }

lets create an object from that class be something like

var Bob = new Person("Bob text", 30);

after making Bob from the "blueprint" Person .. this changes this.name into Bob.name
so the variable in new Person("Bob text", 30) , would be in Bob.name and Bob.age
this would be the result in an object with the following attributes:

Bob.name = "Bob text"
Bob.age = 30


Here's a simple representation:

function Person( nameVariable, ageVariable ) {
     this.name = nameVariable;     *//this.name specifies property while nameVariable specifies value.*
     this.age = ageVariable;


Thank you alot perfect answer i understand it fully now