Linq has a convenient operator method called
Take() to return a given number of elements in anything that implements
IEnumerable. Is there anything similar in jQuery for working with arrays?
There is a slice method
Will return the first four elements.
Don't forget to assign it back to your variable if you want to discard the other values.