I'm trying to have a forEach loop over an array, but only the last few entries.
I'd know how to do this in a for loop, that'd look a bit like this:
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; /* This will loop over the last 3 entries */ for(var x = arr.length; x >= 7; x--){ console.log(arr[x]); } Would there be any way of achieving the same results in a forEach loop?
.forEach()loop.