var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15];
var b = a.splice(0,10);
//a is now [11,12,13,14,15];
//b is now [1,2,3,4,5,6,7,8,9,10];
Also, you can loop through this, as per your requirement.
I hope this will help.
Want to know more about Java? Watch this video on Java Tutorial for Beginners | Java Tutorial :