CJCoding With Joseph

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 its textContent.
2. Convert it with .toUpperCase() and assign it back to textContent.

Expected Output:

<h2 id="heading">WELCOME HOME</h2>
Topics:
HTML DOM
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.