It's not a bug, but it's a known ...situation.

Function statements inside blocks are not a standard feature. They've had
different behavior in different JS engines basically forever, and the last
time we tried to change the behavior we gave up because it broke web sites.

If you tried that in strict mode code, it would be a SyntaxError. Programs
shouldn't use function statements except (a) at toplevel, like your second
example; (b) immediately inside the body of a function.

-j
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to