Global functions
Michael O'Brien
mob at mbedthis.com
Thu Dec 13 16:10:41 PST 2007
Are global functions declared with block or global scope. ie. declared
in the block object or var object?
Consider:
package {
{
function fun() {
print("1");
}
fun()
}
{
function fun() {
print("2")
}
fun()
}
}
This prints
2
2
in the RI.
So should functions be treated like var declarations or as let
declarations. Seems like they are like vars in the RI.
Is this right?
Michael O'Brien
More information about the Es4-discuss
mailing list