Black Lives Matter. Please consider donating to Black Girls Code today.

Multiple point selection/clear in js


I am trying to have some functionality on selecting multiple points as in

I just copied the same example into a fiddle to test before making changes to my application. I am facing issues with it.
Can you please tell me how I can have the same functionality…?

Link to fiddle: