KKitForma.

Language

EnglishEnglishTürkçeTurkishDeutschGermanTool unavailable · open catalogEspañolSpanishTool unavailable · open catalogFrançaisFrenchTool unavailable · open catalogPortuguêsPortugueseTool unavailable · open catalogItalianoItalianTool unavailable · open catalogNederlandsDutchTool unavailable · open catalogPolskiPolishTool unavailable · open catalogРусскийRussianTool unavailable · open catalogУкраїнськаUkrainianTool unavailable · open catalogSvenskaSwedishTool unavailable · open catalogNorskNorwegianTool unavailable · open catalogDanskDanishTool unavailable · open catalogSuomiFinnishTool unavailable · open catalogČeštinaCzechTool unavailable · open catalogRomânăRomanianTool unavailable · open catalogΕλληνικάGreekTool unavailable · open catalogالعربيةArabicTool unavailable · open catalogעבריתHebrewTool unavailable · open catalogفارسیPersianTool unavailable · open catalogاردوUrduTool unavailable · open catalogहिन्दीHindiTool unavailable · open catalogবাংলাBengaliTool unavailable · open catalogதமிழ்TamilTool unavailable · open catalogతెలుగుTeluguTool unavailable · open catalogमराठीMarathiTool unavailable · open catalogગુજરાતીGujaratiTool unavailable · open catalog简体中文Chinese SimplifiedTool unavailable · open catalog繁體中文Chinese TraditionalTool unavailable · open catalog日本語JapaneseTool unavailable · open catalog한국어KoreanTool unavailable · open catalogTiếng ViệtVietnameseTool unavailable · open catalogไทยThaiTool unavailable · open catalogBahasa IndonesiaIndonesianTool unavailable · open catalogBahasa MelayuMalayTool unavailable · open catalogFilipinoFilipinoTool unavailable · open catalogKiswahiliSwahiliTool unavailable · open catalogAfrikaansAfrikaansTool unavailable · open catalogMagyarHungarianTool unavailable · open catalogБългарскиBulgarianTool unavailable · open catalogHrvatskiCroatianTool unavailable · open catalogSrpskiSerbianTool unavailable · open catalogSlovenčinaSlovakTool unavailable · open catalogSlovenščinaSlovenianTool unavailable · open catalogLietuviųLithuanianTool unavailable · open catalogLatviešuLatvianTool unavailable · open catalogEestiEstonianTool unavailable · open catalogCatalàCatalanTool unavailable · open catalogEuskaraBasqueTool unavailable · open catalog
← All topics and search

JavaScript & TypeScript

Types, asynchronous code, modules and JavaScript runtime edge cases.

100 troubleshooting guides · Page 1 / 5

  1. Why does a numeric CSV column sort 12 before 3 in JavaScript?

    Default sorting compares strings.

  2. Why does a boolean sort comparator behave differently across browsers?

    A comparator needs negative, zero and positive results.

  3. Why does new Array(pageCount).map generate no pagination buttons?

    The array contains empty slots, which map skips.

  4. Why do all checklist rows change after Array.fill creates their initial objects?

    Array(3).fill({done:false}) reuses one object.

  5. Why does removing invalid rows in a forward loop skip consecutive errors?

    splice shifts the next row into the current index while the loop advances.

  6. Why does includes miss a selected record reconstructed from JSON?

    The parsed object has a new identity even when every field matches.

  7. How do I deduplicate paginated records while retaining the newest payload?

    Use a Map keyed by record ID and replace its value only when the incoming version or timestamp wins.

  8. Why does a filtered report throw reduce of empty array?

    A reduction without an initial accumulator needs one item.

  9. Why does an export finish before async forEach uploads complete?

    forEach does not await returned promises.

  10. Why do hundreds of requests start despite awaiting Promise.all?

    Creating promises with items.map(fetchItem) starts every operation before the wait.

  11. Why does a timed-out Promise.race fetch continue consuming bandwidth?

    race settles first but cancels nothing.

  12. How do I retry only failed files after a mixed-result upload batch?

    Await Promise.allSettled and inspect each status before reading value or reason.

  13. Why does async permission checking inside filter expose every row?

    An async predicate returns a truthy promise, not the resolved permission.

  14. Why does a nested promise return undefined to the next step?

    A block-bodied then callback must return the nested promise: .then(() => { return fetch(url); }).

  15. Why does logging an API failure in catch make the caller report success?

    A catch that returns normally recovers the promise.

  16. Why does awaiting resolved promises still freeze a large browser import?

    Repeated resolved awaits schedule microtasks without guaranteeing a paint.

  17. Why does setTimeout with zero delay run after a resolved promise?

    After the current task, the event loop drains microtasks before moving to another task such as a timer callback.

  18. Why does a countdown lose minutes after its tab stays in the background?

    Background timers are throttled.

  19. Why does retry immediately fail with an already-aborted signal?

    AbortSignal is one-way: after abortion it stays aborted.

  20. Why does parseInt let 12boxes pass quantity validation?

    parseInt accepts an integer prefix.

  21. Why does clearing an optional quantity field submit zero?

    Number converts empty or whitespace-only strings to zero.

  22. Why does value === NaN fail to catch a broken report total?

    NaN is not strictly equal to itself.

  23. Why does a floating-point equality check reject a calculated decimal threshold?

    Binary floating point cannot represent every decimal exactly.

  24. Why do formatted invoice subtotals concatenate during addition?

    toFixed returns text.

Ask your own question · Sign in to post questions and answers.