Biomedical scientist transitioning into frontend development, after 10 years of research experience — analytical thinking, problem-solving, and attention to detail — to build clean, efficient, and user-friendly web applications. Passionate about combining precision from science with creativity in coding. Fast learner, eager to grow in tech and contribute to impactful projects.
function reverseCase(string) {
let res = [];
for (let i=0; i < string.length; i++){
if (string[i+1] && string.charCodeAt(i) == string.charCodeAt(i+1)){
res.push(i, i+1);
}
}
let res1 = [...new Set(res)]
let newStr = string.split('');
for (let j=0; j < res1.length; j++){
if (newStr[res1[j]].charCodeAt(0) < 91){
newStr[res1[j]] = newStr[res1[j]].toLowerCase();
} else {
newStr[res1[j]] = newStr[res1[j]].toUpperCase();
}
}
return newStr.join('');
}
Intermediate