← Back to HTML DOM
Question 179
Uppercase an Element's Text
Uppercase an Element's Text
Select the heading with id="heading", read its current text, and replace it with the UPPERCASE version. The result should read "WELCOME HOME". Platform-Provided HTML (READ-ONLY):<h2 id="heading">welcome home</h2>Steps: 1. Select the heading and read itstextContent. 2. Convert it with.toUpperCase()and assign it back totextContent.
Expected Output:
<h2 id="heading">WELCOME HOME</h2>= newline. No newline after the last line.
Hints2 available
Sign in to use hintsTopics:
HTML DOM
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.