We are about to switch to a new forum software. Until then we have removed the registration on this forum.
So iv been watching Coding Trains videos and he uses "this." a lot. But i don't understand how they work or are used. If someone could explain it for me that would be great.
Answers
You can also check out You don't know JS - this & Object prototypes
this. refers to a variable that is a part of an object. In my example below, inside my Bubble function I use this. to declare variables and make functions. These functions and variables are a part of the Bubble function. I can also call these variables and functions outside of the Bubble function. I'm sure there's more to it than that. Hopefully my example shows some ways in which this. is used.