In a lot of code, it’s very common to see an init function be declared, like so:
var someObject = {
// What is this for?
init: function () {
// Call here.
}
};
Are there anything particularly special about the init function that I should know?
For some frameworks perhaps (though
prototypeandbackboneuseinitializeinstead), but there is nothing special about theinitfunctions in plain old javascript