← Theory library
JavaScript theory
The language every dApp front-end runs on — executed for real in a sandbox.
Practise in the Code Lab →Easy
- 1. What JavaScript runs onEngines, the browser and Node.js.
- 2. let, const and varBlock scope and why `var` is retired.
- 3. Types and coercionThe seven primitives and the equality traps.
- 4. FunctionsDeclarations, expressions, arrows and `this`.
- 5. ObjectsProperty access, shorthand, spread and destructuring.
- 6. Arrays and iterationmap, filter, reduce and when to use each.
- 7. Strings and template literalsImmutability, methods and interpolation.
- 8. Truthiness and nullish handlingFalsy values, `??` and `?.`
- 9. ClassesConstructors, methods, fields and extends.
- 10. Modulesimport/export, named vs default, and CommonJS.
- 11. Scope and closuresWhy an inner function remembers its outside.
- 12. The event loopOne thread, a task queue and microtasks.
- 13. PromisesStates, then/catch/finally and combinators.
- 14. async / awaitSequential-looking async code and error handling.
- 15. Errorsthrow, Error objects, cause and custom classes.
- 16. JSONSerialising, parsing and the BigInt problem.
- 17. fetch and HTTPRequests, responses and RPC calls.
- 18. Map, Set and WeakMapKeyed collections beyond plain objects.
- 19. Dates and timingTimestamps, seconds vs milliseconds, timers.
- 20. Debugging and the consoleconsole methods, breakpoints and reading a stack trace.
Medium
- 21. Objects and property accessDot vs bracket, shorthand and computed keys.
- 22. Destructuring and spreadPulling values apart and copying them back together.
- 23. Arrays: map, filter, reduceTransformations without loops.
- 24. Iteration and generatorsfor...of, iterables and lazy sequences.
- 25. Map, Set and WeakMapKeyed collections beyond plain objects.
- 26. Classes and prototypesSyntax sugar over the prototype chain.
- 27. Closures and scopeFunctions remember where they were created.
- 28. Promises in depthStates, chaining and combinators.
- 29. async/await and error handlingWriting asynchronous code that reads like synchronous code.
- 30. The event loopMacrotasks, microtasks and starvation.
- 31. Modulesimport, export and why CommonJS still appears.
- 32. JSON and serialisationParsing, stringifying and BigInt pitfalls.
- 33. Numbers, BigInt and token amountsWhy Number breaks on wei.
- 34. Strings, templates and encodingHex, bytes and UTF-8.
- 35. Regular expressionsValidating input without writing a parser.
- 36. Error handling and custom errorsThrowing usefully and failing loudly.
- 37. Fetch and the JSON-RPC protocolTalking to a node without a library.
- 38. Working with wallet providersEIP-1193, accounts and chain switching.
- 39. Reading and writing contracts with ethersProviders, signers and receipts.
- 41. Browser storage and statelocalStorage, sessionStorage and what not to keep.
- 42. The DOM and eventsSelecting, updating and delegating.
- 47. Node.js essentialsScripts, environment and file access.
- 49. Tooling: bundlers, linters, typesThe build pipeline around your code.
Hard
- 40. Events, logs and indexingQuerying history without a database.
- 43. Web WorkersGetting heavy work off the main thread.
- 44. Testing JavaScriptUnit tests, mocks and async assertions.
- 45. Security in the browserXSS, dependencies and secrets.
- 46. Performance basicsMeasuring before optimising.
- 48. Building a small dAppConnect, read, write, react.
- 50. Capstone: from script to productEverything together.