title: How to Convert nAn to 0
body: <p>Array with json
  how to convert isNaN to number zero
  so if you ahve array 1,2,3 and subtract 1,2 how to subtract
  1-1
  2-2
  3- NaN
  NaN should be 0 for 3-0</p>
  
  <pre><code>// Create variables to append player's + or - score per hole
          var golfStroke = scores[y].strokes[q];
          var parStroke = pars[z];
          var scoreStroke = parStroke - golfStroke;
          // Create if statement to change undefined array values to number 0 for calculation
          var isNum = function () {
              if (isNaN(golfStroke)) {
              return 0;
          } else {
              return golfStroke;
          }
          if (isNaN(parStroke)) {
              return 0;
          } else {
              return parStroke;
          };
          }
          console.log("The over or minus par is: " + scoreStroke);
  </code></pre>
  
  <p>Thanks</p>