# Yahoo! UI Library

### collection 3.3.0

Yahoo! UI Library > collection > YUI~array~invoke
Search:
Filters Show Private Show Protected Show Deprecated

## Class YUI~array~invoke

Adds the `Y.Array.invoke( items, methodName )` utility method.

### Methods

#### invoke

`static Array invoke ( items , name , args* )`

Execute a named method on an array of objects. Items in the list that do not have a function by that name will be skipped. For example, `Y.Array.invoke( arrayOfDrags, 'plug', Y.Plugin.DDProxy );`

The return values from each call are returned in an array.

Parameters:
  `items < Array >` Array of objects supporting the named method.
  `name < String >` the name of the method to execute on each item.
  `args* < mixed >` Any number of additional args are passed as parameters to the execution of the named method.

Returns: `Array`
  All return values, indexed according to item index.

Copyright © 2011 Yahoo! Inc. All rights reserved.