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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ernest Nezić](https://uploads.teamtreehouse.com/production/profile-photos/11545277/micro_C3F45FDC-1AB0-46DD-9D4D-51664C2FEE79.jpg)
Ernest Nezić
Full Stack JavaScript Techdegree Student 10,337 PointsHow would I perform a password check where the importance of case sensitivity can't be ignored by uppercasing everything
If the password is, let's say 5d7988B, with the uppercase method we could also write 5D7988b which would result in a correct password that is actually wrong.
1 Answer
![Brandon White](https://uploads.teamtreehouse.com/production/profile-photos/10746138/micro_4228B6A1-B7B6-47B8-9D23-EB9C488C56CC.jpg)
Brandon White
Full Stack JavaScript Techdegree Graduate 34,662 PointsHi Ernest Nezić,
Let me know if I’m not understanding your question correctly, but if case sensitivity is important (as such is with the case of passwords) you simply would not call toUppercase() on the string. You would just compare the user’s input as is against the password stored in the database.
In reality, you would hash the user’s input and compare it against a hashed password within your database, but the point I’m trying to make is that you would not manipulate the user’s input with the toUppercase or toLowercase methods.
Hope that helps. If not, let me know.