+ 2
Unexpected token error
$(document).ready(function(){ var score = 0; $('.btn').click({ score++; $('#nu').text(score); }); }); why is this not working ??
2 Answers
+ 17
$(document).ready(function(){
var score = 0;
$('.btn').click(function(){
score++;
$('#nu').text(score);
});
});
//missed function() inside click({...})
+ 1
@ValentinHacker Thank You