Basic question but its something that I've never quite understood with these array methods.
Say I have an array such as:
[[ 'PENNY', 0 ],[ 'NICKEL', 0 ],[ 'DIME', 20 ],[ 'QUARTER', 50 ]]
and I wanted to use filter to return a new array in which only elements are returned whose first index is greater than 0.
So it would return an array like so:
[ [ 'DIME', 20 ],[ 'QUARTER', 50 ]].
How would I go about this using filter? Some clarification would be appreciated.