Edit in JSFiddle

function sayHello() {
  alert("hello!");
}

var button = document.querySelector("#helloButton");
button.addEventListener("click", function(){
  sayHello();
});
<div class="helloWorld">
  Hello World!
</div>

<button id="helloButton">
  Click me for a hello!
</button>

body {
  background: blue;
}

.helloWorld {
  color: white;
  font-size: 20px;
}

#helloButton {
  background: orange;
  border: none;
  border-radius: 5px;
}

#helloButton:hover {
  background: gray;
}