Answers for "javascript array multiply"

2

multiply arrays javascript

var sum = 0;
for(var i=0; i< arr1.length; i++) {
    sum += arr1[i]*arr2[i];
}
Posted by: Guest on August-21-2021
1

javascript multiply array with scalar

var input = [3, 6, 4];
var scalar = 5;
var output = input.map(x => x * scalar); // [15, 30, 20]
Posted by: Guest on May-20-2020
1

multiply function javascript

// MULTIPLY FUNCTION
const multiply = (num1, num2) => {
  return num1 * num2;
};
let resulMultiply = multiply(4, 5);
console.log(resulMultiply);
// 20
Posted by: Guest on June-09-2020

Code answers related to "javascript array multiply"

Code answers related to "Javascript"

Browse Popular Code Answers by Language