My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 111020: Developer console evaluates arrays improperly
1 person starred this issue and may be notified of changes. Back to list
Status:  Duplicate
Merged:  issue 50316
Owner:  ----
Closed:  Feb 2012

Restricted
  • Only users with Commit permission may comment.


Sign in to add a comment
 
Reported by wmbenede...@gmail.com, Jan 22, 2012
Chrome Version       : 16.0.912.75
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x:
IE 7/8/9:

What steps will reproduce the problem?
In console, enter:
var name=["c","e","l","i","a"];
console.log("Your name is "+name[0]+name[1]+name[2]+name[3]+name[4]);

What is the expected result?
Your name is celia

What happens instead?
Your name is c,e,l

Please provide any additional information below. Attach a screenshot if possible.

This was first seen in an exercise on Codeacademy.com (http://www.codecademy.com/courses/programming-intro/5#!/exercises/1)

I'm not sure how their in-page console works, but it has the same result. This may mean that the issue is not isolated to the developer console.

UserAgentString: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7



What If - Getting Started with Programming Codecademy - Google Chrome.png
134 KB   View   Download
Jan 22, 2012
#2 wmbenede...@gmail.com
Attached is a screenshot of the same code working as expected in Firefox, both in the Firebug console and on Codeacademy.
What If - Getting Started with Programming Codecademy - Mozilla Firefox_2.png
133 KB   View   Download
Jan 23, 2012
#3 wmbenede...@gmail.com
This seems to be tied to the use of "name" as a variable in the global namespace. If I create an object foo and use foo.name instead, there's no problem.

What's odd is that I can redefine other properties of window (i.e. scrollTop) and everything works as expected. It seems to be specific to window.name.
Jan 23, 2012
#4 tkent@chromium.org
(No comment was entered for this change.)
Labels: Feature-DevTools
Feb 6, 2012
#5 pfeld...@chromium.org
(No comment was entered for this change.)
Status: Duplicate
Mergedinto: 50316
Oct 13, 2012
#6 bugdro...@chromium.org
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Labels: Restrict-AddIssueComment-Commit
Mergedinto: chromium:50316
Mar 10, 2013
#7 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Area-Undefined -Feature-DevTools Cr-Platform-DevTools
Sign in to add a comment

Powered by Google Project Hosting