Welcome to the Treehouse Community
Looking to learn something new?
Ben Esther881 Points
I still can't figure out this challenge
Thanks, Ben Esther
var id = "23188xtr"; var lastName = "Smith"; id.toUpperCase(); var userName = id;
Steven Parker221,309 Points
Don't forget to store the result in the variable.
Most methods (and certainly the string case conversion ones) don't actually change the thing you call them on. So you need to put the result somewhere.
So this code creates an uppercase version of "id" but then puts the original value of "id" into the new variable:
id.toUpperCase(); var userName = id;
But with a slight rearrangement, the upper case version is put into the new variable instead:
var userName = id.toUpperCase();