code: function withInsertions(initial, insertions) {
    if (insertions.length === 0) {
      return initial;
    }
    let edited = '';
    let prevIndex = 0;
    insertions.forEach(({ index, string }) => {
      edited += initial.slice(prevIndex, index) + string;
      prevIndex = index;
    });
    edited += initial.slice(prevIndex);
    return edited;
  }
docs: Given an initial string, and a list of "insertion" { index, string } objects, return a new string with these insertions applied.