so I've wrote this function, i want to uppercase the vowels and lowercase every other letter, problem the end result ends with the same string, I'm new to spread and for-each, after i spread a string does it become an array? when i manipulate letters does it suppose to become a string again with the manipulations or do i need to join it? why aren't the upper and lowercase functions don't work?
the function:
function upperCase(str) {
var vowels = "aeiou";
[...str].forEach(letter => {
if (vowels.includes(letter)) letter.toUpperCase();
letter.toLowerCase();
});
console.log(str);
}