title: Variable Not Changing In Javascript
body: <p>I have a recently started coding in Javascript with the ProcessingJS library. I completed to Khan Academy into to JS course. I have a function, when x and y are on the selected area. It should stop the loop, move x and y, and move the score1X and score1Y to 0 then start the loop. The score1X and score1Y are not moving. The function is called in a draw = function. Thanks a lot!</p>
  
  <pre><code>var CreatePoint = function(score1X, score1Y) {
      if (x &gt;= score1X - 10 &amp;&amp; x &lt;= score1X + 10 &amp;&amp; y &gt;= score1Y - 10 &amp;&amp; y &lt;= score1Y + 10){
          noLoop();    
          points ++;
          x -= 10;
          y -= 10;
          score1X = 0;
          score1Y = 0;
          loop();
      }
      else if (points &lt;= 0) {
          ellipse(score1X, score1Y, 20, 20);
      }
  };
  
  draw = function() {    
      fill(255, 255, 255);
      text(points + "/5", 20, 20);
      CreatePoint(score1X, score1Y);
      CreatePoint(score2X, score2Y);
      CreatePoint(score3X, score3Y);
      CreatePoint(score4X, score4Y);
      CreatePoint(score5X, score5Y);
  };
  </code></pre>