Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Array.prototype.insert function #39

Open
Avalonalan opened this issue Feb 8, 2020 · 0 comments
Open

Refactor Array.prototype.insert function #39

Avalonalan opened this issue Feb 8, 2020 · 0 comments

Comments

@Avalonalan
Copy link

Please disable all extensions in your browser, and then try again. If the issues still happen, provide the information below:

Describe the bug

Even if for-in loop is not recommanded, there are still some people using it.
If someone use for-in loop to loop an empty array, there an error happens. Because
javascript object is prototype chain, enumerable properties are also looped over when an
empty array is looped over.

Information

  • OS: Windows 10
  • Browser: Chrome (Latest)
  • Extensions: Json viewer, Page ruler, and Language tool.
  • Version: 79.0.3945.130 (Official Build) (64-bit)

Additional context
It also occurs when I use IE, Edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant