I'm trying to put a table through a summation function however the function doesn't consider any of the values inside as a number

I've tried changing how the table is set and what values go through but I have yet to accomplish my goal

```js
class Vector2{
    constructor(x, y){
        this.x = x;
        this.y = y;
        this.X = x;
        this.Y = y;
    }
}

function Sum(a, start, end){
    let s = 0;
    for(i = start; i <= end; i++){
        s += a[i];
    }
    return s;
}

const v1 = new Vector2(1, 2);
const v2 = new Vector2(-1, 1);
const v3 = new Vector2(-1, -1);
const v4 = new Vector2(1, -1);

var arrX = [v1, v2, v3, v4];

//var sx = Sum(arrX, 0, 3);
//var sy = Sum(arrY, 0, 3);

//var X = (1/arrX.length)*Sum(arrX, 0, 3);
//var Y = (1/arrY.length)*Sum(arrY, 0, 3);

//console.log(X, Y);

function init(){
    var x = [];
    var y = [];
    var cx = 0;
    var cy = 0;
    for(i = 0; i < arrX.length; i++){
        x[i] = arrX[i].x;
        console.log(Sum(x, 0, 3));
    }
}

init();

```