Why is this toUppercase() not working?

Why is this toUppercase() not working?
0.0 0

#1

Hi,

I don’t understand why this function is not working. https://jsfiddle.net/JuliaRie/jrxnrsw5/5/
Thank you in advance for your help!

Love,

Julia


#2

.toUpperCase() - capital C


#3

Thank you, but it still didn’t help.


#4

I know :wink: there are a lot of other errors:

dot at the end of the first line, misspelled querySelectorAll(), misspelled innerHTML(), then you are setting str to an empty string and trying to upperCase it.


#5

What a mess :slight_smile:


#6

We all started somewhere :slight_smile:

I recommend you to add id="container" to the div in the HTML and use getElementById() instead of querySelectorAll().

And look into correct syntax of innerHTML (it is not a function).


#7

Yes! I did it! I went from querySelectorAll to getElementsByClassName to getElementById. And only with the last one it worked.
So you can’t use classes with JS?


#8

Why is the second function toLowerCase is not working? No errors.

https://jsfiddle.net/JuliaRie/jrxnrsw5/33/


#9

The Difference Between ID and Class


#10
...
  lowercase(JS); // <-- missing quotes
}) // <-- missing parens