I have the following pattern however I'd like to know if I am thinking about this the right way. Do I need to assign the arguments to this
? Is there anything you would do differently?
var myFunction = (function()
{
function privateCheck(a,b)
{
console.log(a+b);
}
return
{
init: function(x,y)
{
privateCheck(x,y);
}
}
})();
myFunction.init(3,4);
myFunction.init(4,5);