I made the following function which converts the given string into a code as per instruction.

now the problem i am facing is that when i run this function by passing the string `sanmveg` it cosnverts it very nicely but is skipping on alphabat tht is `v` in the above string:  

my function look like this:

```
   function coder(str){
        str = str.replace(/[ ]+/g,'');
        str = str.split('');// now str is an Array
        var code ='';

        for(var i=0;i<str.length;i++){ // now suppose i here is A
        console.log(str[i])
            for(var j=0; j<hr.length;j++){
                for(var k=0;k<hr[j].length;k++){
                    if(hr[j][k] === str[i]){
                        code = code+'#'+String(j)+'@'+String(k)+'~';
                    }// end of if statement
                }// end of k loop
            }// end of j loop
        }// end of i loop

        return code;
    };// end of coder function

```

here `hr` means `horizontal rows` and is a multi-dimentional arry:

```
var hr = [['A','B','C','D','E','F','G','H','I','J'],
          ['a','b','c','d','e','f','g','h','i','j'],
          ['K','L','M','N','O','P','Q','R','S','T'],
          ['k','l','m','n','o','p','q','r','s','t'],
          ['U','V','W','X','Y','Z','0','1','2','3'],
          ['4','5','6','7','8','9','!','@','#','$'],
          ['%','^','&','*','(',')','-','=','_','+'],
          ['[',']','{','}',':',';',',','/','.','<'],
          ['>','?',' ']];

```

Problem
=======

`coder(sanmveg) //#3@8~#1@0~#3@3~#3@2~#1@4~#1@6~`

but this actually should be `#3@8~#1@0~#3@3~#3@2~#5@1~#1@4~#1@6~`
so that clearly means that the nested for loop is skipping one index some where 

How do solve this problem  

Explain if possible  

every little help would be greate