Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 9: Understanding the Document Object Model (DOM) with JavaScript!
Instruction
Change an Attribute
In general, the syntax to change attributes is as follows:
element_name.attribute_name = "new value";
// or:
element_name.setAttribute("attribute_name", "new value");
The HTML element <a> has an href attribute:
<a id="refToSomewhere" href="https://www.example.com">...</a>
This href attribute can be changed:
function show() {
"use strict"...