Edit in JSFiddle

document.querySelector('button').addEventListener('click', () => {
  alert('Something went wrong!')
})
<button>Try me!</button>