BCE0005: Unknown identifier: error after udating to 3.4.2f3

Please could someone help, here is my javaScript, after updating unity i am getting the BCE0005 error. The issue is with the ‘for(i=0;i<10;i++)’ part, i have tried changing it to ‘var for(i=0;i<10;i++)’, but then it changes into another error. any suggestions?

var newScore : int;

var oldScore : int;

newScore = Count;

for(i=0;i<10;i++)

{

  if(PlayerPrefs.HasKey(i+"HScore")){
     if(PlayerPrefs.GetInt(i+"HScore")<newScore){ 

        oldScore = PlayerPrefs.GetInt(i+"HScore");

        PlayerPrefs.SetInt(i+"HScore",newScore);

        newScore = oldScore;
     }
  }else{
     PlayerPrefs.SetInt(i+"HScore",newScore);

     newScore = 0;

Thanx in advance

“var for…” doesn’t make any sense. The for loop is not a variable. i is.

for (var i = 0; i < 10; i++)