title: What is wrong with this code for an Elo rating system
body: <p>I am trying to make a program that automatically changes the person's elo rating. I ran into a problem that I can't seem to solve. Here's the code:   </p>
  
  <pre><code>        Liam=1000; 
          Stefan=1000; 
          Dylan=1000; 
          Dennis=1000; 
          Daniel=1000; 
          K=32; 
          //eloX is the player who won 
          var ratingChange = function(PlayerX,PlayerY){ 
          //Expected Winning percentage of player X 
          var EWP_X = 1/(1+10^((PlayerY-PLayerX)/400)); 
          //WP=Winning Percentage 
          WP=1; 
         //Player X rating change 
         PlayerX = PlayerX+K*(WP-EWP_X); 
         console.log(PLayerX)
         }; 
         ratingChange(Liam,Dylan)
  </code></pre>
  
  <p>Whenever I test this Javascript I get the error "PlayerX is not defined". I'm rusty in Javascript so I'm sure it's an obvious problem that I over looked. Thanks for your help!</p>