for (var i = 0; i < vecA.length; i++) {
            product += vecA[i] * vecB[i];
        }