Code: Select all
function myFunc()
{
function test()
{
alert("test');
}
}
For instance, I'd like to be able to call it like this:
Code: Select all
myFunc().test()
or
myFunc.test()
But in any case, I always get an error saying test() is undefined. Does anyone know how to accomplish this?
My end goal is to expose a function within my script so that external scripts can access it directly.
Thanks