Ad
  • Custom User Avatar

    i starts as the char code of the first entry, it will increment if it matches in the .map to be the one more (the i++). If it doesnt match at any point then there is a missing letter, and i will stop increasing which will leave i as the char code of the missing letter.

    It's useful to go along with pen and paper to see what each operation is doing. Remember that i++ mutates i, and notice that the map is just acting as a forEach here