(function () {
if (some scripts loaded) {
otherFunction();
} else {
window.setTimeout( "CALL_SELF_AGAIN_HERE" , 100);
}
})();
How to call anonymous function from within anonymous function ?
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.
Give it an identifier:
This is what’s known as a “named function expression”. The identifier is only in scope inside the function it refers to.
Don’t use
arguments.calleesince it’s deprecated and will actually throw a syntax error in strict mode.