Re: FunctionExpress ion's and memory consumptions
On Nov 1, 2:24 am, Conrad Lender <crlen...@yahoo .comwrote:
Try this:
<script>
window.onload= function () {
function foo () { alert('outer'); }
if (true) {
function foo () { alert('inner'); }
}
foo();
};
</script>
Mozillas: -outer
Everywhere else: -inner
--
Jorge.
On Nov 1, 2:24 am, Conrad Lender <crlen...@yahoo .comwrote:
On 2008-10-31 08:21, Jorge wrote:
>
>
They're not ignored. Try the function in my previous post and see if you
get an alert.
(...)
I'm not sure how this is relevant - nothing in that thread suggests that
Mozilla discards function declarations in a block.
>
No no it's not so. Any function declaration inside an inner block is
considered an error and ignored (in Mozillas).
considered an error and ignored (in Mozillas).
They're not ignored. Try the function in my previous post and see if you
get an alert.
(...)
I'm not sure how this is relevant - nothing in that thread suggests that
Mozilla discards function declarations in a block.
<script>
window.onload= function () {
function foo () { alert('outer'); }
if (true) {
function foo () { alert('inner'); }
}
foo();
};
</script>
Mozillas: -outer
Everywhere else: -inner
--
Jorge.
Comment