The If Works This dirt was a building before

Archive for 27 September 2007

Reiterate 1.2: operators are (kind of) methods now!

You know how, in Ruby, + is a method? Well guess what: // Count members within a range numbers.findAll({‘>’: 4, ‘<=’: 27}).length // Remove items of a specific type collection.reject(['instanceof', String]) // Assign default values to a collection [27, 0, 'prototype', '', true, false].map({‘||’: ‘foo’}) // -> [27, "foo", "prototype", "foo", true, "foo"] How’s about [...]