Multiplique as matrizes JavaScript

var sum = 0;
for(var i=0; i< arr1.length; i++) {
    sum += arr1[i]*arr2[i];
}
Doubtful Dunlin