Ext.Array.slice() is used to grab a range of elements from given begin and end figure. I’m slicing out 10 elements from a large array.
Now, I’d like to slice 10 elements from the array which meet certain condition (like passing a function to slice() which returns truthy value), instead of grabbing 10 values directly. How can I do that?
Which version of ExtJs are you using? If you are on version 4 or above checkout the Array.filter method.
E.g.