I copied some javascript from a download site. I am a little confused because this code contains multiple functions. The first function calls the other two functions. However the called functions are defined within the opening and closing brackets of the calling function.
Is it okay to embed a function definition within the definition of another function? I wouldn't think so but the JS works!
i.e.
function x()
{
var xx = y();
var xxx = z();
function y()
{
.....
}
function z()
{
.....
}
}
Is it okay to embed a function definition within the definition of another function? I wouldn't think so but the JS works!
i.e.
function x()
{
var xx = y();
var xxx = z();
function y()
{
.....
}
function z()
{
.....
}
}