What does (this); mean on end of class method in javascript?

javascript

Solution

It means that it executes itself with `this` as the parameter.

When you put parenthesis at the end of a function expression, it's self executing, and executes after it has been defined. The fact that `this` is inside the parenthesis suggests that it is passing `this` as the parameter.

Problem

What does `(this);` mean on end of function in JavaScript? I have a class with functions in it. Can I call `this.outputSome` within that class more times and/or when can I call it? ``` __construct = function(constructor){ //some code }(this); this.outputSome = function(obj){ //some }(this); ```

Original source