I have a 2d array of images called "onClickCard",
What I'm trying to do is make is so that every time I click one of the images in the 2d array I increment my variable called "click" by 1.
running the following:
var click = 0;
var click=onclick.click+1
I just get a console error stating "Uncaught TypeError: Cannot read property 'click' of null: onClickCard, onclick"
edits:
I tried the below suggestion of
var click = 0;
window.onclick=function(){click ++;}
and each click is still returning 0.