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

console.log in array not working as expect #44

Open
JiangWeixian opened this issue Sep 29, 2024 · 0 comments
Open

console.log in array not working as expect #44

JiangWeixian opened this issue Sep 29, 2024 · 0 comments

Comments

@JiangWeixian
Copy link
Owner

Screenshots
If applicable, add screenshots to help explain your problem.

Describe the bug
A clear and concise description of what the bug is.

const a = []
a[2] = 1
console.log(a.length)
for (let i = 0; i < a.length; i++) {
  console.log(i)
}

only console.log(a.length) worked

Expected behavior
A clear and concise description of what you expected to happen.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Version (please complete the following information):

  • Version [e.g. 22]
  • OS [e.g macos]

Additional context
Add any other context about the problem here.

  • Mini reproduction
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