title: how to draw svg polygon on the points of mouse click position
body: <p>I have a project: on mouse clicks and move and next click and so on; by every click's position I want to make an svg polygon but I don't have any idea as to how.</p>
  
  <p><a href="https://i.stack.imgur.com/a4lh4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a4lh4.png" alt="when mouse move same time polygon&#39;s last point appearing at mouse pointer and when I click and move, the clicked position get a vertices point and so on"></a></p>
  
  <p>When the mouse moves, at the same time the polygon's last point is appearing at the mouse pointer and when I click and move, the clicked position get a vertices point and so on.</p>