A value is assigned to this, a JScript keyword that refers to either:
-
the object currently executing a method,
-
the global object if there is no current method (or the method does not belong to any other object).
A method is a JScript function that is invoked through an object. Inside a method, the this keyword is a reference to the object through which the method was invoked (which happens to be the object created by invoking the class constructor with the new operator).
Inside a method, you can use this to refer to the current object, but you cannot assign a new value to this.
To correct this error
-
Do not assign a value to this. To access a property or method of an instantiated object, use the dot operator (for example, circle.radius).
Note
You cannot name a user-created variable this; it is a JScript reserved word.