Hi there!

My function isArray(x) evaluates different results in Firefox (version 
15.0.1, Firefox for Linux Mint, mint - 1.0) and Firebug (version 1.10.6). 
In particular, isArray([2,4,6]) returns true in Firefox but false in 
Firebug.

More detailed, I have 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>
  <script>
    document.write(isArray([2,4,6]));
  </script>
</body>
</html>

When I load this in Firefox, it shows
  true
as expected.

But when I open the Firebug console and I enter
  isArray([2,4,6])
the answer is
  false

This is even more strange, as the input of
  [2,4,6].constructor && [2,4,6].constructor === Array
returns
  true

What is going on?

Thank you in advance,
Cheers, 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.


Reply via email to