Then, to remove an edge, let's do the inverse and splice them out of each others' lists.
xxxxxxxxxxremoveEdge(src, dest) { const srcDestIdx = this.adjacencyList.get(src).indexOf(dest); this.adjacencyList.get(src).splice(srcDestIdx, 1); const destSrcIdx = this.adjacencyList.get(dest).indexOf(src); this.adjacencyList.get(dest).splice(destSrcIdx, 1);}OUTPUT
Results will appear here.