Here's a list of recipes we think we need. Pick one, implement it, and remove it from the page. Alternately, add a quick note here for a recipe you'd like to see so someone else can add it.
- Ensuring variables are closed over # with "do"
- HTML methods # JS .sup(), .sub(), .blink(), .link(url), etc. May not exist in your JS implementation!
- Replacing substrings
- Testing every element in an array
- Detecting presence of matching items in an array
- square root # JS Math.sqrt
- Constants # JS Math.PI, Math.E
- floor, ceil, round # JS Math.floor, Math.ceil, Math.round
- Raising a number to a power # JS Math.pow(x, y)
- Logarithms # Math.log
- Finding the base-n log # Math.log(num) / Math.log(base)
- Exponents # Math.exp
- Check if a credit card is valid (checksum, Luhn algorithm)
- Nested functions
- Optional Arguments # use arg? to detect presence: if arg=0, arg? == true
- Abstract Factory
- Chain of Responsibility
- Template Method
- Couch access
- MySQL/PostgreSQL access