/**
* @param {string} s
* @return {boolean}
*/
var halvesAreAlike = function (s) {
const mid = s.length >>> 1;
let left = 0,
right = s.length - 1,
count = 0;
while (left < mid && right >= mid) {
if (isVowel(s[left])) {
++count;
}
if (isVowel(s[right])) {
--count;
}
++left;
--right;
}
return !count;
};
function isVowel(ch) {
return "aeiouAEIOU".includes(ch);
}