const reverseArray = (words) => {
for (let i = words.length - 1; i >= 0; i--) {
console.log(`${words[i]}`);
}
};
const sentence = ['sense.', 'make', 'all', 'will', 'This'];
console.log(reverseArray(sentence))
// Should print ['This', 'will', 'all', 'make', 'sense.'];
const nums = [1, 2, 3, 4, 5];
console.log(reverseArray(nums));
// Should print 5,4,3,2,1
But it keeps giving me Undefined at the end ? I know this is a rookie question , sorry.