arr = ['red', 'green', "blue", "pink", "purple"];
var arr1 = [];
for (var i = 1; i <= arr.length; i++) {
console.log(arr1.length)
arr1[arr1.length] = arr[arr.length - i];
console.log(arr1.length)
}
console.log(arr1);