Maybe it's already been fixed? I tried it in the latest Chrome beta "11.0.696.65 beta-m" and it returns 1.
-Mike On Sat, May 7, 2011 at 3:20 PM, J.R. <[email protected]> wrote: > After scratching my head for a while, I've found a bug in Google Chrome > (latest version 11): > > [0, false, 15].indexOf(false); // should return 1, but it returns 0; > > In Firefox 4, the test above returns 1 (the correct result). > > I guess Google Chrome is testing the array for the searchElement existence > using the '==' operator instead of the Strict Equals Operator (===). > Therefore, Chrome is not compliant with ECMA-262 5th ed., 15.4.4.14. > > -- > João Rodrigues (JR) > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
