I have a char array:

```
var charCode = [97,98,100,101,103];

```

I want to loop through this array and compare `charCode[i]` with `charCode[i+1]` so compare:

```
charCode[0] with charCode[1]
charCode[1] with charCode[2]
charCode[2] with charCode[3]
charCode[3] with charCode[4]

```

I also want to check if `charCode[i] +1 == charCode[i+1]` so this means i want to see if the next element is bigger than last by factor on one. One more thing, if e.g charCode[3] does not follow that rule I want to store the element's index in a separate variable.

```
function fearNotLetter(str) {
  var bool ;
  var charCode = [];
  for (var i = 0; i < str.length; i++) {
    charCode[i] = str.charCodeAt(i);
    // charCode = [97,98,99,100,101,103]
  }
  for (var n = 0; n < charCode.length; n++) {
    /*
    here I'm comparing every element with every other element, 
    which is obviously not what I want
    */
    for (var j = n+1; j < charCode.length; j++) {
      if (charCode[n] + 1 < charCode[j]) {
        // don't know what to do here
      }
    }
  }
  return  charCode;
}
fearNotLetter("abcdeg");

```