How to et the current end points of svg path?

How to et the current end points of svg path?

Hi all there is an example of how to draw a svg path (and others) while I am scrolling - link . So there is a path rendered in svg. At the beginning that path is not rendered. Just as I am scrolling it is  rendered step-by-step ... so how can I get the current position of last points [ x,y ]? I hope you understand what I want and thank you for answers.