So, I am learning functions and trying to create a function which takes an array as a parameter.
function printArray(arr){
for (let i = 0; i < arr.length; i++){
let upperCased = arr[i].toUpperCase();
return upperCased;
};
}
const testArray = ['o', 'p'];
printArray(testArray);
However, it returns only the first value 'O'