code: function permuteLine(line, startIndex){
      var newLine = [];
      for (let i = 0; i < line.length; i++){
          var index = (i + startIndex) % line.length;
          // skip the first (repeated) index
          if (index !== 0) {
              newLine.push(line[index]);
          }
      }
      newLine.push(newLine[0]);
      return newLine;
  }
docs: Cyclically permute closed line starting at an index