4 JavaScript Array Bugs Beginners Hit — and How to Watch Them Happenfor...of items vs indexes, indexOf returning 0, splice in a forward loop, and sort() comparing text12 min read·codeglyphs.hashnode.dev1d ago
Why Your `if / else` Took the Wrong Branch: 4 JavaScript Condition Traps"My if is wrong" is almost never true. The if did exactly what you wrote. It just took a different branch from the one you had in your head. That gap between the branch you expected and the branch tha10 min read·codeglyphs.hashnode.dev1d ago
5 JavaScript Loop Bugs Every Beginner Hits (And How to Watch Them Happen)Most loop bugs don't crash. They hand back a number that is slightly wrong, and the code looks fine when you read it top to bottom. Reading loops like prose is the problem. A loop is a small machine:11 min read·codeglyphs.hashnode.dev2d ago