Issue metadata
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
,
May 19 2017
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
,
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.
,
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
,
May 20 2017
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
,
May 20 2017
Thanks! |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kavvaru@chromium.org
, May 19 2017