Beginners question - member variables

I looked into the following code in the Hotspot example.
I dont understand where
for example


etc come from.
They are not defined in code and I couldn’t find them in the api reference as welll
What am I missing ?

Hotspot.prototype.initialize = function() {
    // Create a hit area using a bounding sphere
    this.hitArea = new pc.BoundingSphere(this.entity.getPosition(), this.radius);
    // More information about pc.ray:
    this.ray = new pc.Ray();
    this.defaultForwardDirection = this.entity.forward.clone();
    this.directionToCamera = new pc.Vec3();
    this.sprite = this.entity.children[0];
    // Register the mouse down and touch start event so we know when the user has clicked, this.onMouseDown, this);
    if ( {, this.onTouchStart, this);

this.hitArea it’s almost the same as var hitArea, in other words, it is a variable declaration.

In your case, there is the Hotspot class, which, using the prototype property, adds a new initialize method. Since the method is the same function, therefore, for the initialize method, the scope is limited to the anonymous function that is created. If inside the initialize method you create a variable using the var keyword, then this variable will be available only inside this method and it will be difficult to access it from other methods. If you declare a variable using the execution context of this, then this variable will be available in all methods of this class.

Thanks a lot. Didn’t look as a declaration to me :slight_smile:
My JS seems a bit rusty