+ 1

What am i doing wrong

var clicks = 0; function addClick(){ clicks += 1; function charity(){ addClick -= 1; } document.getElementById("clicks").innerHTML = clicks; };

28th Nov 2016, 12:40 AM
Richard
3 Respostas
+ 2
functions within: you cannot declare another function but you can call another function
28th Nov 2016, 2:09 AM
Naveen DA
Naveen DA - avatar
0
your charity function is undefined
28th Nov 2016, 12:41 AM
Ian
Ian - avatar
0
and you could just use the button tag
28th Nov 2016, 12:42 AM
Ian
Ian - avatar