I want to reverse an array without using the built-in methods but the following function is not working:
function reverseArray(arr) {
let brandNewArray = [];
for (let i = arr.length - 1; i >= 0; i--) {
brandNewArray += arr[i];
}
return brandNewArray;
}
reverseArray([1,2,3]);