Welcome to the Treehouse Community
Looking to learn something new?
I cant get my code to work on js.It says that "the userName variable is undefined". Can anyone help?
the code challenge says to use the string method to assign toUppercase the value id to the variable username.is the string method another type of code or is it the same one that I just used.I am kind of confused since the code is not working. Thanks.
var id = "23188xtr"; var lastName = "Smith"; var userName=console.log(id.toUpperCase());
Thomas Fildes16,201 Points
It is more simple than you think, basically you have used the console.log function which isn't needed because you are only assigning a variable value. Here is the correct code below:
var userName = id.toUpperCase();
Hope this helps,