<html><head></head><body><scr ipt>
(function () {
var watch = "Hola !";
(function f () { alert(watch) })();
alert(typeof f);
})();
</script></body></html>
This yields:
Safari : "Hola !", "undefined" .
FireFox : "function () watch { [native code] }", "undefined"
Could you (kindly, please) tell me why :
1.- FF turns watch into a native function.
2.- f remains undefined.
TIA,
--Jorge.
(function () {
var watch = "Hola !";
(function f () { alert(watch) })();
alert(typeof f);
})();
</script></body></html>
This yields:
Safari : "Hola !", "undefined" .
FireFox : "function () watch { [native code] }", "undefined"
Could you (kindly, please) tell me why :
1.- FF turns watch into a native function.
2.- f remains undefined.
TIA,
--Jorge.
Comment