So it seems that count[whatever] returns NaN for some reason. Why?
  var i;
  var count = new Array(12);
  for( i = 0; i<999;i++)
   {
     var firstDice = Math.floor(Math.random() * 7);
     var secondDice= Math.floor(Math.random() * 7);
     var total = firstDice + secondDice;
     count[total]++;
   }
   console.log(count[3]);
   for(index=2; index<=12; index++)
   {
     console.log("EL NUMERO "+index+" SALIO "+ count[index]+" VECES MIVIVI");
   }
 
     
     
    