$w :: Utility Methods |
This is one of those life-savers for people who just hate commas in literal arrays :-)
Examples
$w('apples bananas kiwis') // -> ['apples', 'bananas', 'kiwis']
This can slightly shorten code when writing simple iterations:
$w('apples bananas kiwis').each(function(fruit){ var message = 'I like ' + fruit // do something with the message })
This also becomes sweet when combined with Element functions:
$w('ads navbar funkyLinks').each(Element.hide); |
Prototype API 1.5.0 - prototypejs.org