title: javascript auto call function in object
body: <p>I need to create a dynamic object. I'll store all of these objects in an array. Each object will have some property and objects. After the object is created, I need to do an auto execute method from it. I can't call in my code like this: <code>obj.doSomething</code> because some users have 2 objects, and other users 300 objects.</p>
  
  <p>Something like this: </p>
  
  <pre><code>class Select {
      constructor(el,input){
          this.el = el; 
          this.input = input
      }
  
      AutoExecture(){
          // I need these function to execute immediately;
          console.log(this.input);
      } 
  }
  </code></pre>