<button type="button" onclick="skriv1()">Skriv</button>
<div></div>
<button type="button" onclick="skriv2()">Skriv</button>
<div></div>

<script>
click = 0;

const skriv1 = () =>{
click = click + 1;
document.getElementsByTagName("div")[0].innerHTML = click;
};

const skriv2 = () =>{
click ++;
document.getElementsByTagName("div")[1].innerHTML = click;
};
</script>