Javascript in keyword returns index for arrays; hence points[pos] is required to display point values.

Modified polygon function debug info to display points instead of indexes within the array