JavaScript
Welcome to the JavaScript library. Each page focuses on one idea, with examples you can run and a short summary you can use for revision.
Timing and events
Section titled “Timing and events”- Debounce vs throttle — compare the two patterns before choosing one.
- Debounce — wait until rapid events settle.
- Throttle — limit work during a continuing stream of events.
JavaScript fundamentals
Section titled “JavaScript fundamentals”- Variables, hoisting, and expressions — understand
var,let,const, declaration timing, and conditional expressions.
Coding problems
Section titled “Coding problems”- Palindrome — start with a readable solution, then compare it with two pointers.
- Reverse a string with loops — build the result one character at a time.
- Factory stack balancer — plan one safe robot command at a time.
Arrays and algorithms
Section titled “Arrays and algorithms”- Sort without
sort()— compare bubble sort and merge sort in both directions. - Trace nested loops and swaps — follow indices and array changes step by step.
How to use these guides
Section titled “How to use these guides”Read a page, type its example yourself, and change one input to see what happens. The sidebar follows the content folders in GitHub, so new topics will appear here as the library grows.