Q:

Javascript init() function isn't being called automatically

I'm using this syntax for my class creation (jQuery):
$.myClass = function() {}
$.myClass.prototype = {
    init: function() {
        console.log('initializing');
    },
    someFunc: function() = {
        console.log('some function is being called');
    }
}

When I call
var myClassObj = new $.myClass();

My init() function isn't being called, I have to call it manually. How do I edit my class's default initialization function instead of creating a separate one?

A:

You missed this -    
$.myClass = function() 
    {
      this.init();
    }

