I am trying to understand how the this
keyword works in JavaScript and I made this script:
function click(){
this.innerHTML="changed";
}
Used in this HTML:
<button id="clicker" onclick="click()" >Click me</button>
But it doesn't work, can anyone explain why?