If I have
var function_holder = {
someFunction: function () { }
};
How do I call someFunction.
Also is there a way to write someFunction outside of function_holder?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
function_holderis an object,someFunctionis a method.Call
function_holder.someFunction();to invoke the method.You can define the function seperately as either a function declaration
or a function variable