So I'm looking to create a really simple function that +=1 on a number variable and also saves so that which ever number users get to it stores. My current code appears to be adding 1 on as a string each time. Can somebody help me understand where I'm going wrong?
document.cookie = "balance = 0"
var balance = document.cookie;
var moneyup = () => {
document. cookie = balance +=1;
document.getElementById("moneybox").innerHTML = "Money: £"+balance;
}