Add a comment here:
// point.length is either 2 (errorBars) or 3 (customBars)

I was initially confused because I read this as a loop over all the points, rather than the elements of a single point.