Does JavaScript has similar functionality as Ruby has?
array.select {|x| x > 3}
Something like:
array.select(function(x) { if (x > 3) return true})