Js The Weird Parts ((better)) May 2026

And arrow functions? They don’t have their own this at all—they inherit from the surrounding scope. Arrays in JS are just objects with numeric keys and a special length property. That means you can do... questionable things.

You are not alone. JavaScript is the quirky, misunderstood genius of the programming world. It was built in 10 days, it drives the modern web, and it has a list of "features" that look more like bugs.

function showThis() { console.log(this); } showThis(); // window (or undefined in strict mode) js the weird parts

So next time you see [] + [] returning "" , don’t cry. Laugh. Then fix it. And remember: you’re not alone. What’s the weirdest JavaScript bug you’ve ever encountered? Hit reply or drop a comment—I’d love to compare war stories.

Welcome to the weird parts. Let’s start with the most infamous party trick. And arrow functions

const obj = { showThis: showThis }; obj.showThis(); // obj

It gets weirder:

const bound = showThis.bind("hello"); bound(); // String {"hello"}