@anonymous/

PartialEsteemedAustralianfreshwatercrocodile

JavaScript

No description

fork
loading
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//http://www.freecodecamp.com/bonfires/missing-letters
function fearNotLetter(str) {
  for (i = 1; i<str.length; i++)
    {
      current = str.charCodeAt(i);
      compare = str.charCodeAt(i-1);
      
      if (current > (compare+1)) {
          console.log('Missing letter is:' + (compare+1));
          return String.fromCharCode(compare+1);
      } else {
          return; 
      }
     
}

}
fearNotLetter('abce');
Native Browser JavaScript