JSFiddle - React, Tailwind, and code Playground

by akang2

HTML

<button id="myButton" rel="hellokitty">hello my button</button>

JavaScript

//Learning about Event Listeners!!!

var theButton = document.getElementById('myButton');

console.log(theButton);

theButton.addEventListener('mouseover', yellAtMe);

function yellAtMe() {
    alert('OMG  AAAAAAHH ITS JUSTIN BIEBER!!!!!!!!!');
}

console.log(theButton.hasAttribute('rel'));