When I press get money, it will add [object HTMLDivElement]1 instead of just 1. this is the code:
<script>
function cash(){
var Cash = 0
document.getElementById("Cash").textContent = Cash
}
function text(){
Cash = Cash + Number(1)
document.getElementById("Cash").textContent = Cash
}
</script>
</head>
<body onload="cash()">
<div id="Cash"></div>
<button class="button-long" onclick="text()">Get Money</button>
</body>
I do not know what is happening and I have found nothing else on how to fix this. The CSS has nothing to do with it, I have checked the code many times and changed and tested a lot of times as well and I have found nothing on this website or any other website about this. I would like some help on this one as I do not know what is happening.