What is Private function ?
function that we can’t access directly.
–JS
function test () { var privatefunction = function () { alert('hello'); } return { publicfunction : function () { privatefunction(); } } };
Now use it.
var a = test(); a.publicfunction();
This will be call privatefunction.