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

i am trying to apply the ToUpperCase() and ToLowerCase() but both they won't work???

i am trying to apply the ToUpperCase() and ToLowerCase() but both they won't work???

Steven Parker
Steven Parker
243,656 Points

If you show your code, someone might be able to spot the problem.
Even better, make a snapshot of your workspace and post the link to it here.

Hi there,

Try a code like this one below:

var str = "Hello World!"; var res = str.toLowerCase();

If you wish to convert to lower or upper case the string selected, you will need to write the string (for example var str = "Hello World" and attached the method of toLowerCase(); or to UpperCase(); preceded by a "."

1 Answer

Steven Parker
Steven Parker
243,656 Points

You may have a capitalization error.

Since I haven't seen your code, this is just a guess — but the actual names of those functions are toUpperCase() and toLowerCase() (both start with a lower-case "t").

Since JavaScript is case-sensitive, if you spelled them with capital "T" that may be the problem.