CJCoding With Joseph
15free / daySign inCreate account

Select the link with id="navLink" and change its href to "https://example.com" and its text content to "Visit Example".

Platform-Provided HTML (READ-ONLY):

<div id="navigation">
  <a id="navLink" href="#">Old Link</a>
</div>

Steps: 1. Use document.getElementById() to select the link 2. Change its href attribute to "https://example.com" 3. Change its textContent to "Visit Example"

Expected output

<div id="navigation">
  <a id="navLink" href="https://example.com">Visit Example</a>
</div>

= newline. No newline after the last line.

Hints4 available
Topics
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.