Hola chicos mi funcion no esta funcionando..
function onoff() { if(a != true){ var a = true alert("System is on") } else if(a == true) { var a = false alert("System is off") } }Y este es el html
<button type="button" id="demo" onclick="onoff()">Click Me!</button>No pude entenderlo, ¿cómo puedo hacerlo? Gracias por tu ayuda <33