title: If condition on event listeners
body: <p>I would like to  use the <code>addEventListener</code> as a condition
  so that if the condition is true by the clicking of  the
  image, the code executes, but it doesn't seem to work.</p>
  <pre><code>HTML
  &lt;div class = &quot;content&quot;&gt;
  &lt;img src = &quot;dog.png&quot; alt =  &quot;&quot;   id  = &quot;firstImage&quot; &gt;
  &lt;img src = &quot;coatOfArm.png&quot; alt =  &quot;&quot;  id  = &quot;second 
  Image&quot; &gt;
  &lt;p  id = &quot;score&quot; &gt;0&lt;/p&gt;
  &lt;/div&gt;
  
  JavaScript
  var firstImage = 
  document.getElementById(&quot;firstImage&quot;);
  var secondImage = 
  document.getElementById(&quot;secondImage&quot;);
  
  var score= document.getElementById(&quot;score&quot;);
  var totalScore_1 = 0;
  var totalScore_2 = 0;
  
  firstImage.addEventListeners(&quot;click&quot;,function() {
  totalScore_1++;
  score.innerHTML = totalScore_1;
  }) 
  
  secondImage.addEventListeners(&quot;click&quot;, function() { 
  totalScore_2++;
  score.innerHTML = totalScore_2;
  }) 
  
  function increScore() {
  
  if(first Image clicked == true){
  
  firstImage. append(score) ;
  } else{
  secondImage. append(score) ;
  } 
  } ;
  
  increScore() ;
  </code></pre>