[1, 2, 3].map(function(i) { return i + i });
// -> [2, 4, 6]
['one', 'two', 'three'].each(alert);
// Alerts "one", then alerts "two", then alerts "three"
[1, 'two', 3, 'four', 5].findAll(Object.isString);
// -> ['two', 'four']
[1, 7, -2, -4, 5].detect(function(n) { return n < 0; });
// -> -2
['hello', 'world', 'this', 'is', 'nice'].sortBy(function(s) {
return s.length;
});
// -> ['is', 'nice', 'this', 'world', 'hello']