dotProduct
should be a function.
testString: assert(typeof dotProduct == 'function', 'dotProduct
should be a function.');
- text: dotProduct([1, 3, -5], [4, -2, -1])
should return a number.
testString: assert(typeof dotProduct([1, 3, -5], [4, -2, -1]) == 'number', 'dotProduct([1, 3, -5], [4, -2, -1])
should return a number.');
- text: dotProduct([1, 3, -5], [4, -2, -1])
should return 3
.
testString: assert.equal(dotProduct([1, 3, -5], [4, -2, -1]), 3, 'dotProduct([1, 3, -5], [4, -2, -1])
should return 3
.');
- text: dotProduct([1, 2, 3, 4, 5], [6, 7, 8, 9, 10])
should return 130
.
testString: assert.equal(dotProduct([1, 2, 3, 4, 5], [6, 7, 8, 9, 10]), 130, 'dotProduct([1, 2, 3, 4, 5], [6, 7, 8, 9, 10])
should return 130
.');
- text: dotProduct([5, 4, 3, 2], [7, 8, 9, 6])
should return 106
.
testString: assert.equal(dotProduct([5, 4, 3, 2], [7, 8, 9, 6]), 106, 'dotProduct([5, 4, 3, 2], [7, 8, 9, 6])
should return 106
.');
- text: dotProduct([-5, 4, -3, 2], [-7, -8, 9, -6])
should return -36
.
testString: assert.equal(dotProduct([-5, 4, -3, 2], [-7, -8, 9, -6]), -36, 'dotProduct([-5, 4, -3, 2], [-7, -8, 9, -6])
should return -36
.');
- text: dotProduct([17, 27, 34, 43, 15], [62, 73, 48, 95, 110])
should return 10392
.
testString: assert.equal(dotProduct([17, 27, 34, 43, 15], [62, 73, 48, 95, 110]), 10392, 'dotProduct([17, 27, 34, 43, 15], [62, 73, 48, 95, 110])
should return 10392
.');
```