title: JavaScript init function and its use
body: <p>I'm new to JavaScript and saw a coode where a <code>init</code> function is used while declaring the object..I tried searching for "JavaScript init functions" but it does not take me to any correct document. Also, it does not provide me the exact application of this function&hellip;</p>
  
  <p>I have modelled a function on how it looks like</p>
  
  <pre><code>var1 = Class.extend({
   init : function(){ alert ('Hi'}
  }
  </code></pre>
  
  <p>Question:</p>
  
  <ol>
  <li>How does init does called? Is it similar to the init(initialization) method in Object oriented concepts.</li>
  <li>Can you please provide a example on how init function could be called?</li>
  </ol>