If I can use array[i] inside of a for loop, why can't I use a different number-containing variable in a similar fashion, for example:
var arrayLength = array.length;
var end = string.slice(array[arrayLength],stringLength);
console.log(arrayLength);
theRestArray.push(end);
end