New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 724431 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

traversing not work in console

Reported by zzz...@gmail.com, May 19 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. var obj = {a:1, b:2}
2. for(var key in obj){console.log(key)}
3. got "undefined"

What is the expected behavior?
print the keys correctly

What went wrong?
the traversing not work if "for in" syntax is used,but work well when "for in" is used

Did this work before? Yes i do not know

Chrome version: chromium 58.0.3029.110  Channel: stable
OS Version: 10.0
Flash Version: 

i have no comments
 
Labels: Needs-Triage-M58
Labels: Needs-Feedback
Is it reproducible on any page or only on specific one?

I just run this code in console and it works good to me:
var obj = {a:1, b:2}
undefined
for(var key in obj){console.log(key)}
VM110:1 a
VM110:1 b

Comment 3 by woxxom@gmail.com, May 19 2017

>got "undefined"

this is because "var obj = {a:1, b:2}" is a statement, not an expression, see https://stackoverflow.com/a/44049415 - apparently you also have console filtering selector set to Warnings or Errors in which case normal console.log is not shown because chromium developers have broken the filtering and don't want to admit it, see  https://crbug.com/717776 

>the traversing not work if "for in" syntax is used,but work well when "for in" is used

this line should be reworded to make sense because currently it doesn't.

Comment 4 by zzz...@gmail.com, May 20 2017

yes,woxxo
I filtered the content of console,I should set it to "Logs"
so,it is not a bug,it is my fault
Project Member

Comment 5 by sheriffbot@chromium.org, May 20 2017

Cc: kozyatinskiy@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kozyatinskiy@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)
Thanks!

Sign in to add a comment