var ObjectLiteral = {
myName:function() {
}
}
- I want to call the myName function immeditetly when the page is
loaded. - I am not sure hot to write a self calling function inside an
ObjectLiteral…
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.
You can’t assign a function while simultaneously calling it (since calling it means that its return value gets assigned instead). You have to do this in two steps.