O'Reilly logo

Prototype and Scriptaculous: Taking the Pain out of JavaScript by Chris Angus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.25. Enumerable members (Prototype)

Member Type
each
Function(Function(val::Object,at::number)->undefined)->undefined
all
Function([Function(val::Object,at::number)->Boolean])->boolean
any
Function([Function(val::Object,at::number)->Boolean])->boolean
collect
Function(Function(val::Object,at::number)->any)->Array
detect
Function([Function(val::Object,at::number)->Boolean])->any
entries
Function() -> Array
find
Function([Function(val::Object,at::number)->Boolean])->any
findAll
Function([Function(val::Object,at::number)->Boolean])->Array
grep
Function(RegExp,Function(val::Object,at::number)->any)->Array
include
Function(objectToFind::Object) -> boolean
inject
Function(unit::Object,
             Function(accum::Object,val::Object,index::number)-> any)
         -> any
invoke
Function(method::string,[,arg0::any,...,argN::any]) -> Array
map
Function(Function(val::Object,at::number)->any)->Array
max
Function([fn:Function(val::Object,at::number)->number])->any
member
Function(objectToFind::Object) -> boolean
min
Function([Function(val::Object,at::number)->number])->any
partition
Function(Function(val::Object,at::number)->boolean)->Array of Array
pluck
Function(property::string) -> Array
reject
Function(Function(val::Object,at::number)->Boolean)->Array
select
Function(Function(val::Object,at::number)->Boolean)->Array
sortBy
Function(Function(val::Object,at::number)->any)->Array

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required