Getting element by Id
The element is referenced by ID
The JavaScript is added in the markup after field of the rectangle. Remember, when using JavaScript, make sure you reference the element after it’s createed.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/id
The element above has an id of “myRectangle”. We use JavaScript to find and add an outline to the element and writing it to the console
W