3. .toUpperCase() and .toLowerCase()


#1

https://www.codecademy.com/courses/javascript-beginner-en-ZA2rb/0/3?curriculum_id=506324b3a7dffd00020bf661

It doesnt say it is wrong and it lets me go to the next level if i jus leave it like this but i want to know what is supposed go in the prompt on line 2?

var user = prompt("You are out in the forest in the middle of the night with no memory...what do you do? STAY, LOOK FOR CIVILIZATION (type CIVILIZATION), or START DANCING?");
 var answer = prompt("").toUpperCase();

#2

This exercise isn't asking for a specific text string to be used in your prompt. All you have to do is utilize the toUpperCase() or toLowerCase() function properly with a prompt. If you use toUpperCase(), all the text that the user inputs in response to the prompt gets capitalized. If you use toLowerCase(), all the text that the user inputs in response to the prompt is set to lower case.

If you want to see your toUpperCase() function work, run your code, input any text string in all lower case when the prompt box pops up and see what logs to the console.


#3

Okay thank you so much!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.