Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Loops, Arrays and Objects Tracking Data Using Objects The Student Record Search Challenge Solution

toUpperCase... Hello, can you help me to understand where do I have to put "uppercase or lowercase"

toUpperCase... Hello, can you help me to understand where do I have to put "uppercase or lowercase" in order to write the names in the search with both capitals or not? thanks in advance.

Daiane Silva
Daiane Silva
5,668 Points

Hello, you're getting an input from a user, and checking if the response matches some data that you have correct? If that's the case this is what you do:

var response = prompt("Please type your name").toUpperCase(); or var response = prompt("Please type your name").toLowerCase();

This will work as well:

var response = prompt(); var responseUpper = response.toUpperCase();

1 Answer

Thank you so much!!!