Hello. Sorry. Must've missed this.
The issue is you have
conectionsTo.length. It's missing an n. A lower priority, as there was an error, but it would be better to have a better message; have opened an issue to look into and address.
valueOf refers to the current post only, not the ones you're iterating though. You'll just add the yardage up over and over for each connection with the commented summation.
this.postNum will refer to the current post, which if called like
var currentPost = new Fencepost(99, 0, 5);
the current post is
currentPost and its postNum will be 99.
this.connectionsTo[i].postNum refers to posts connected to the current post via sendRopeTo, and further one of those post's postNum.