diff --git a/scripts/dot_product.js b/scripts/dot_product.js new file mode 100644 index 0000000..d4b0939 --- /dev/null +++ b/scripts/dot_product.js @@ -0,0 +1,12 @@ +var f = function (a1, a2) { + var i=0; + var result = 0; + if (a1.length !== a2.length) { + console.log("Input error - Vectors must be of the same length"); + return; + } + for (i; i