const reverse = (str) => {
let z = "";
for ( let i = 0; i < str.length; i++) {
if ( str[i].toLowerCase()) {
z += str[i].toUpperCase();
} else if (str[i].toUpperCase()) {
z += str[i].toLowerCase();
} else {
z += str[i];
}
}
return z;
}
console.log(reverse("FhoD hE. *+"));