Script async vs defer vs type=module: Loading Order Explained
When a plain script blocks parsing, why async runs in arrival order and defer in document order, and how module scripts fit, tested in Chrome.
Focused explanations and longer guides, with worked scenarios, common mistakes and interview exercises across every chapter.
Showing 1–24 of 200 articles
When a plain script blocks parsing, why async runs in arrival order and defer in document order, and how module scripts fit, tested in Chrome.
call and apply run a function now with a chosen this; bind returns a new function for later. Covers arguments, borrowing and the listener trap.
One task written three ways (callbacks, promise chains, async/await) with error handling, parallel work and the return-await trap, run in Node.
How long each lasts, who can read it, what goes to the server, and why HttpOnly cookies beat localStorage for session tokens when XSS is in play.
map builds a new array, forEach runs side effects and returns undefined, for...of can break. See sparse arrays, chaining and the parseInt trap.
INNER JOIN keeps only matching rows; LEFT JOIN keeps every left row and fills gaps with NULL. See counts, anti-joins and the WHERE filter trap.
UNION removes duplicate rows after combining two queries; UNION ALL keeps every row and skips the sort or hash. Learn when each is correct.
What actually reaches Angular's ErrorHandler, how to write one that never throws or loops, and where HTTP and chunk-load errors belong.
How resource() turns a signal-driven request into value, status and error signals, cancels stale loads, and why value() can throw on error.
Without zone.js, Angular renders only when notified. See which updates notify, which silently don't, and how TestBed catches the gaps for you.
Which JavaScript array methods change the array in place, which return a new one, and how toSorted, toSpliced and with fix the old traps.
Why new Date('2026-03-08') can show March 7, how DST breaks adding 24 hours, and how to store, compute and display dates in JavaScript safely.
How ?. short-circuits a whole chain, how ?? differs from ||, and when optional chaining hides a real bug instead of handling missing data.
Build query strings with URLSearchParams, resolve relative URLs against a base, and check protocol and host before your server fetches.
Announce cart updates, result counts and errors to screen readers from React: why live regions must already exist, and how to repeat a message.
Why every React context consumer re-renders when any part of the value changes, and how splitting state, actions and slow-changing data fixes it.
Split React bundles with lazy and Suspense, preload chunks before the click, and handle the chunk-load failures that follow every deploy.
Events from a React portal bubble through the React tree, not the DOM. Here is what that breaks in click-outside logic, and how to fix it.
What StrictMode calls twice in development, the exact mount, unmount, mount sequence in React 19, and how to fix the effects it exposes.
Show a sent message before the server answers with useOptimistic, see how it rolls back on failure, and avoid the outside-transition trap.
Expose a small focus() and clear() API from a React component with useImperativeHandle, pass refs as props in React 19, and know when not to.
How CASE evaluates branches in order, why a missing ELSE or WHEN NULL quietly returns NULL, and how to pivot counts with conditional aggregates.
Join a table to itself to show each employee's manager, pair rows without mirror duplicates and find repeated emails before cleanup.
Combine queries with UNION, INTERSECT and EXCEPT, predict their duplicate and NULL handling, and see where EXCEPT beats NOT IN.
No notes match that… try another filter.