JavaScript
Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features.
Popular
New
Join 2,630+ developers using this skill
skill
Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features.
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
User needs JavaScript expertise — from core language features to modern patterns. Agent handles async/await, closures, module systems, and ES2023+ features.
| Topic | File |
|---|---|
| Async patterns | |
| Type coercion rules | |
| Array and object methods | |
| Modern ES features | |
== coerces: "0" == false is true — use === alwaysNaN !== NaN — use Number.isNaN(), not === NaNtypeof null === "object" — check === null explicitly{} === {} is falsethis depends on call site — lost in callbacksthis from lexical scope — use for callbackssetTimeout(obj.method) loses this — use arrow or .bind()this is element in regular function, undefined in arrow (if no outer this)let in loop or IIFE to capture valuevar hoisted to function scope — creates single binding shared across iterationslet per iterationsort(), reverse(), splice() mutate original — use toSorted(), toReversed(), toSpliced() (ES2023)push(), pop(), shift(), unshift() mutate — spread [...arr, item] for immutabledelete arr[i] leaves hole — use splice(i, 1) to remove and reindexObject.assign are shallow — nested objects still reference originalawait returns Promise, not value — easy to miss without TypeScriptforEach doesn't await — use for...of for sequential asyncPromise.all fails fast — one rejection rejects all, use Promise.allSettled if need all results.catch() or try/catch with await0.1 + 0.2 !== 0.3 — floating point, use integer cents or toFixed() for displayparseInt("08") works now — but parseInt("0x10") is 16, watch prefixesNumber("") is 0, Number(null) is 0 — but Number(undefined) is NaNBigInt for big numbersfor...in iterates keys (including inherited) — use for...of for valuesfor...of on objects fails — objects aren't iterable, use Object.entries()Object.keys() skips non-enumerable — Reflect.ownKeys() gets all including symbols[] + [] is "" — arrays coerce to strings[] + {} is "[object Object]" — object toString{} + [] is 0 in console — {} parsed as block, not object"5" - 1 is 4, "5" + 1 is "51" — minus coerces, plus concatenates"use strict" at top of file or function — catches silent errorsx = 5 without declaration failsthis is undefined in strict functions — not global objectwith forbiddenNo automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.