You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
399 B

/*===
function
function
===*/
/* Simple test that function declaration name and function expression name
* can be accessed from inside the function.
*/
function foo() {
print(typeof foo);
}
try {
foo();
} catch (e) {
print(e.name);
}
var funcexpr = 'not visible';
var temp = function funcexpr() {
print(typeof funcexpr);
};
try {
temp();
} catch (e) {
print(e.name);
}