I am just beginning learning HTML/CSS/JS. My experience with programming is only with FileMaker Pro and Databases. I am trying a button that toggles a variable through values ON and OFF. What am I doing wrong?
var content = "ON";
function Change() {
if (content == 'ON') {
var content = "OFF";
} else {
var content = "ON";
}
console.log(content);
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<button onclick="Change();">Change </button>
</body>
</html>