const string = 'AnaStAsIA'
const upper = []:
const lower = [];
for(i = 0; i < string.length; i++) {
let character = "";
character = string.charAt(i);
if (character == character.toUpperCase()) {
upper.push(character);
} else {
lower.push(character);
}
}
if(upper.length > lower.length) {
do something.....
}