const myArray = ['cat', 'dog', 'fish', 'turtle'];
// to select first 3 elements
myArray.slice(0, 3).forEach( arrayEntry => { /* first three entries */ } );
// you can do the same from the end of the array
myArray.slice(-2).forEach( arrayEntry => { /* last two entries */ } );