Inject and Pluck: The Secret Sauce Behind Prototype's Enumerable

December 28th, 2006 . 15 comments

No misspelling in that title. Two of the most underused, albeit powerful, methods of Prototype are pluck and inject. Pluck provides an easy way to get at data, and inject is like the duct tape of Prototype—applicable in a variety of cases. Let’s look at how these methods can help tidy up our code and make our life a little easier.

Continue reading article…