I want to call one JavaScript function from another JavaScript file
below is my code:
var exJS = function () {
function coolMethod() {
alert("hello suraj");
}
}
when I call the function
var myClass = new exJS();
myClass.coolMethod();
Why do I get the error that coolmethod
is not defined?