According to the chrome console there are no problems however there are as my variable is "undefined" despite it being set as "0"
I have used the following resources: Resource 1 Resource 2
I am trying to make it so when the user clicks my image it will add +1 to the points variable (Game.points) here is my code (for context purposes):
<!DOCTYPE html>
<script>
function Game() {
var points = "0"
document.getElementById("myText").innerHTML = Game.points;
}
</script>
<center> <img onclick="Game.points = Game.points + 1" src="https://static.wikia.nocookie.net/villains/images/5/5d/Frieza.png/revision/latest?cb=20200625063534" width="350px"> </center>
<body onload="Game()">
<h1>"The value for number is: " <span id="myText"></span></h1>