Challenge 13 i don't see the error is working perfect on editor


#1

Hi pls help see code below

function allRocks(){

 var alpha = ['A','B','C','D','E','F','G','H','I','J','k','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
 var allrocks = [];
 
 
 for (var i = 0; i < GRID.length; i++){
   
    for (var j = 0; j < GRID[0].length; j++){
       if (GRID[i][j] === '^'){
          allrocks.push(alpha[j]+(i+1));  
       }
       
    }
    
 }
 
 return allrocks;  

}

function allCurrents(){

      var alpha = ['A','B','C','D','E','F','G','H','I','J','k','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
      var allcurrents = [];
 
 for (var i = 0; i < GRID.length; i++){
   
  
    for (var j = 0; j < GRID[0].length; j++){
       if (GRID[i][j] === '~'){
        
        allcurrents.push(alpha[j]+(i+1));  

       }
       
    }

 }

 return allcurrents;
  }

#2

Looks like you have a lowercase ‘k’ in your var alpha, change that to an uppercase ‘K’ and see if that works.


#3

Thank you for your help