Then, to remove an edge, let's do the inverse and splice them out of each others' lists.

JAVASCRIPT
OUTPUT
Results will appear here.