> Markdown version of [/videos/1451-best-of-the-worst-the-most-awful-anti-features-in-javascript-ranked?t=43](https://www.wearedevelopers.com/videos/1451-best-of-the-worst-the-most-awful-anti-features-in-javascript-ranked?t=43). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Best of the Worst – the most awful anti-features in JavaScript, ranked! Why do fundamentally broken JavaScript features remain permanently unfixed? Discover the bizarre anti-features forever trapped in the language's architecture by the strict rule of infinite backwards compatibility. - **Speakers:** [Peter Kröner](https://www.wearedevelopers.com/@peter-kroner) - **Event:** World Congress 2025 - **Published:** August 20, 2025 - **Duration:** 27:06 - **URL:** https://www.wearedevelopers.com/videos/1451-best-of-the-worst-the-most-awful-anti-features-in-javascript-ranked ## Summary JavaScript's uncompromising commitment to backwards compatibility means developers inevitably encounter bizarre, frustrating, and conceptually broken language "anti-features." Examining these quirks reveals the underlying mechanics of JavaScript's execution contexts and type systems. For instance, primitive object wrappers like the boolean constructor generate objects that ironically coerce to true, confusing logical checks and evading strict typing systems. Moving deeper into execution scopes, the `new Function()` constructor is widely dismissed as an unsafe anti-pattern, yet it provides a critical runtime escape hatch. Because string-based functions natively execute in the global scope, they remain the only guaranteed way to rescue execution sequences from shadowed global variables or malicious overrides of native built-ins like `undefined` and `window`. The language's ECMAScript specifications utilize environment records to map these execution scopes, revealing how controversial syntax can introduce drastic dynamic performance hits. The deprecated `with` statement forcibly injects an object into a local environment record, introducing non-deterministic variable resolution. Because browsers cannot statically evaluate these volatile locations during analysis, fundamental compilation optimizations are bypassed, effectively slowing down downstream script execution. The uncompromising directive to never break older internet platforms means web architecture must universally accommodate this highly inefficient legacy code forever. This strict adherence to infinite web backwards compatibility also dictates modern language evolution, explicitly explaining why JavaScript introduces context-sensitive keywords—like `of` in iteration loops—instead of reserving raw dictionary words that might immediately break millions of existing legacy scripts. These inherent ecosystem constraints persistently force developers to navigate historically flawed foundational APIs natively built into the runtime environment. A prime example is the trap-laden `parseInt` function, which confusingly returns floating-point numbers and dangerously attempts to infer base-16 structures from untrusted user string inputs. While JavaScript successfully repaired flawed validation tools in ES6 by introducing strict operations like `Number.isNaN`, engine implementers functionally bypassed the single opportunity to patch string parsing by purely aliasing the broken `parseInt` onto the global `Number` object. This deliberate duplication preserves dangerous type-coercion pitfalls, ultimately proving that writing resilient code requires treating historical legacy behavior as an immutable architectural constraint rather than a bug awaiting a patch. **Keywords:** javascript anti-features, primitive object coercion traps, function constructor scope execution, global variable shadowing mitigation, ecmascript environment records, javascript static analysis blockers, with statement performance degradation, web browser backwards compatibility, context-sensitive language keywords, parseint base-16 coercion pitfalls, strict number.isnan validation, javascript legacy api behavior, global execution isolation strategies, typescript typing bypass techniques ## Chapters 1. **Evaluating the true impact of bad JavaScript features** (00:43) — Examining historically significant language quirks reveals deeper architectural flaws beyond simple type coercion jokes. 1. **Confounding logical checks using primitive wrapper objects** (01:48) — Constructing boolean and number primitives as objects accidentally bypasses logical operators and strict type enforcement checks. 1. **Bypassing variable shadowing with the function constructor** (05:56) — Executing strings as functions provides a reliable escape hatch for accessing globally shadowed system variables. 1. **Breaking static analysis via dynamic object environment records** (10:41) — The legacy with statement creates unpredictable scoping that neutralizes static analysis and degrades overall engine performance. 1. **Parsing integer pitfalls and the persistence of legacy flaws** (19:46) — The numerical string parser introduces hex guessing traps that remain unpatched in modern class object implementations. 1. **Rapid overview of minor frustrating web platform quirks** (25:46) — Rapidly traversing bizarre string routines and legacy document models illustrates the complexity of maintaining backwards compatibility. ## Related Moments - [Addressing the complaints about JavaScript as a programming language](https://www.wearedevelopers.com/videos/118-how-to-stop-choosing-javascript-frameworks-and-start-living) (from "How to Stop Choosing JavaScript Frameworks and Start Living") - [Overview of extreme rules lawyering in JavaScript standards](https://www.wearedevelopers.com/videos/100116-extreme-rules-lawyering-with-the-ecmascript-specifications) (from "Extreme Rules Lawyering with the ECMAScript Specifications") - [How heavy JavaScript payloads degrade browser performance and resilience](https://www.wearedevelopers.com/videos/285-the-lean-web) (from "The Lean Web") - [Creating resilient applications relying on modern hardware integrations](https://www.wearedevelopers.com/videos/290-project-fugu-progressive-web-apps-superpowered) (from " Project Fugu: Progressive Web Apps, Superpowered") - [Evaluating the operational trade-offs of modern javascript frameworks](https://www.wearedevelopers.com/videos/1347-wearedevelopers-live-rendering-in-the-browser-the-state-of-css-and-accessibility-and-more) (from "WeAreDevelopers LIVE - Rendering in the Browser, The State of CSS and Accessibility and more") - [Exploring browser limits with JavaScript golfing and weird hacks](https://www.wearedevelopers.com/videos/2135-wearedevelopers-live-streaming-html) (from "WeAreDevelopers LIVE - Streaming HTML") ## Related Articles - [Dev Digest 136 - No JS(on) of mine](https://www.wearedevelopers.com/magazine/482-dev-digest-136-no-js-on-of-mine) - [Dev Digest 126 - * yells at cloud](https://www.wearedevelopers.com/magazine/463-dev-digest-126-yells-at-cloud) - [Dev Digest 124 - None like it hot](https://www.wearedevelopers.com/magazine/460-dev-digest-124-none-like-it-hot) - [Dev Digest 131 - AI'm not sure about OSS](https://www.wearedevelopers.com/magazine/472-dev-digest-131-ai-m-not-sure-about-oss) ## Related Jobs - [Senior Software Engineer](https://www.wearedevelopers.com/jobs/ext/15942-senior-software-engineer) at **GitHub** - [Senior Software Engineer, Fraud](https://www.wearedevelopers.com/jobs/ext/1280398-senior-software-engineer-fraud) at **Twilio** - [Software Engineer](https://www.wearedevelopers.com/jobs/ext/1304673-software-engineer) at **Bitpanda** - [Software Engineer](https://www.wearedevelopers.com/jobs/ext/1377585-software-engineer) at **Bitpanda** - [Principal Software Engineer, Database Infrastructure](https://www.wearedevelopers.com/jobs/ext/1465908-principal-software-engineer-database-infrastructure) at **GitHub** - [Senior Software Engineer, Enterprise Products](https://www.wearedevelopers.com/jobs/ext/1841248-senior-software-engineer-enterprise-products) at **GitHub**