Hi,
I am trying to solve - https://www.freecodecamp.org/challenges/spinal-tap-case, now it seemed easy till i realise that even underscore is treated as upper case , not only that all character like * etc are also upper case , how can i over come this , this is my current code - It is just the start logic but the fact that _ is also upper case is making me confused …
function spinalCase(str) {
var newStr = str.split("");
for(var i = 0; i < newStr.length; i++){
if(newStr[i] === newStr[i].toUpperCase()&& i !== 0){
console.log(i);
}
}
// newStr = newStr.join("");
// console.log(newStr);
}
spinalCase("The_Andy_Griffith_Show");
//spinalCase("This Is Spinal Tap");
//spinalCase("thisIsSpinalTap")
;