Answers for "javascript multiply array with scalar"

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

Code answers related to "javascript multiply array with scalar"

Code answers related to "Javascript"

Browse Popular Code Answers by Language