code: function backCountSequentialChar(string, index, char) {
    let count = 0;
    for (let i = index - 1; i >= 0; --i) {
      if (string[i] !== char) {
        break;
      }
      ++count;
    }
    return count;
  }
docs: index の位置から前にcharがいくつあるか数える string = "aabbccddee" , index = 6, char = "c", return = 2