Hi there,
I might have overlooked something trivial, but I can't figure out what it
is and I am really stuck with my programs, due to some strange behaviour.
Consider the following HTML file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html" charset="ISO-8859-1">
<script type="text/javascript">
function isArray(x) { return (x.constructor && x.constructor ===
Array); }
</script>
</head>
<body>
<h1> <code>[2,4,6]</code> is an array? </h1>
<script>
document.write(isArray([2,4,6]));
</script>
</body>
</html>
When I open this file in Firefox (15.0.1 Firefox for Linux Mint, mint -
1.0), it shows:
[2,4,6] ist ein Array? true
and that is what I would expect.
But when I open the Firebug (version 1.10.6) console, the input of
isArray([2,4,6])
returns
false
This is strange, especially since the input of
[2,4,6].constructor && [2,4,6].constructor === Array
returns
true
Why does it return different results for isArray([2,4,6]) in Firefox and
Firebug?
Thank you in advance,
Thomas
--
--
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug
---
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.