Frage im Vorstellungsgespräch bei Google

Suppose that the 'select' method of the Array does not exist. Implement it using the 'each' method. Pack it as a Module, ready to be mixed in.

Antwort im Vorstellungsgespräch

Anonym

17. Sept. 2012

You should build the return value in the each loop, filtering the results with the block parameter passed to the method.