Replace a vowel with " *" from an array - JavaScript

Hello coders,
I’m trying to write a function, that will take an array as a parameter. I want to return a new array, but with vowels replaced by '’.
Example : ["h’, “i”] => should be [“h”, "
"]
I’m just getting [ " * " ] and not the remaining array elements.
Please help!

function replaceVowels (arr) {
let vowels = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’] ;
let result = [ ];
for ( let i=0; i< arr.length; i++) {
if ( ! vowels.includes(arr[i])) {
arr[i] = ’ * ';
result.push(arr[i]);
}
}
return result;
}
replaceVowels([“h”, “i”]);

You’re only pushing to the array if its a vowel, and you’re replacing those with *. You’ve put the push the wrong side of the curly bracket – it should be after the one on the next line, outside the if block.

Also, there’s no need to alter arr, just push the star if it’s a vowel, push arr[i] if not.