Articles
- Using the 'this' keyword: Object literals and their methods.
- Testing for Integers with the Modulo Operator: Simple but effective.
- JavaScript Closures - Part 1: What is a closure and what common mistakes do people make when using them?
Examples
- Closures: A run through of some common examples of closures in the wild.
- Closure Conundrum 1: Investigating seemingly mysterious behaviour.
- Closure Conundrum 2: Arguments and loops.
- Closure Conundrum 3: Using our own array to pass arguments to the constructor.
- Closure Conundrum 4: Finale. Objects as parameters.
- Prototypes: Showing how properties are searched for in a chain and how objects can 'inherit' from others.
- Prototypes - Placement: How prototypes and constructors interact.
- ProtoMart: A tale of prototypes.
- Object.beget(): Douglas Crockford's method.
- Timers: Trying to show the difference between a central timer and individual timers for many objects.
- Anonymous Function Recursion: How an anonymous function can refer to itself.
- Pre-filling Function Arguments: Simplify your API. Mmmm naan.
Numbers
- Significant Figures: Building a function to display numbers to a specified number of significant figures, without using standard index form.
Arrays
- Shuffling Arrays: Randomly ordering the elements of an array.