We have a string that is comprised of two words, the classic hello World!, but someone forgot to capitalize the "h"!
Okey so in the first line we declare a variable called string and assign the value "hello World!" to it. In the second line we declare a second variable called capitalizedString. The value for that variable is the result of two operations we preform on string.
This method is used to convert all the characters from their initial state to upper case.
"slice() extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string." - MDN
This method is used to return the rest of the word after the first letter. These to are then combined and returned from the operation. We combine these methods because just using .toUpperCase alone returns only the first letter after the operation.
Hopefully this tip can be useful!