the question is there is a method such as .toUpperCase() which recognises that there might be spaces between the strings in different cases. I researched on it however couldn't find one. This is what I want to implement. It was one of the exercises on the code academy.
var movie = prompt("movie please").toUpperCase();
var getReview = function (movie) {
switch(movie){
//case 'Toy Story 2':
//console.log("Great Story. Mean prospector.");
//break;
//case 'Finding Nemo':
console.log("Cool animation, and funny turtles.");
break;
case 'The Lion King':
console.log("Great songs.");
break;
default:
console.log("I don't know!");
}
};
I passed the exercise using a different code but I just wanted to ask out of curiousity.