0
Should I use "this" every time for creating new method?
3 Antworten
+ 10
You are using "this." when you use something IN an object.
"this." means the object which I am now in.
If you sit in a car you can call the car 'this'.
You could say 'this.seat' is dirty and everybody now exact that you mean only and exact the car where you are sitting in this moment.
+ 2
this is a placeholder for any object that will be created from Class/prototype in JS.
0
well explained Jürgen klopp