---
title: "Discussion on \"4 JavaScript Array Bugs Beginners Hit — and How to Watch Them Happen\" | Hashnode"
description: "Discussion on \"4 JavaScript Array Bugs Beginners Hit — and How to Watch Them Happen\". for...of items vs indexes, indexOf returning 0, splice in a forward loop, and sort() comparing text"
url: "https://hashnode.com/posts/four-javascript-array-bugs-beginners-hit/6b1114abb0dd78a64aac0882"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [4 JavaScript Array Bugs Beginners Hit — and How to Watch Them Happen](https://codeglyphs.hashnode.dev/four-javascript-array-bugs-beginners-hit?utm_source=hashnode&utm_medium=feed)

for...of items vs indexes, indexOf returning 0, splice in a forward loop, and sort() comparing text

1d ago · 12 min read · codeglyphs.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#programming-ciovqvfcb008mb253jrczo9ye](https://hashnode.com/tag/programming-ciovqvfcb008mb253jrczo9ye)

## Written by

[Iineman2](https://hashnode.com/@lineman2)

@lineman2

  
[View profile](https://hashnode.com/@lineman2)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
