Basically, I'm trying to create a game where the goal is to click on images so they disappear. 

I've made a function that spawns one image on a random location on the screen. Then I've also made an interval so it spawns 15 images in random locations. Now I want the images to disappear when clicked on.

My thoughts on doing this were to make a "click" function, so if the images are clicked the "img.style.height = '0px';

However, I'm not getting this or anything to work.