Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript multiply array with scalar

var input = [3, 6, 4];
var scalar = 5;
var output = input.map(x => x * scalar); // [15, 30, 20]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #multiply #array #scalar
ADD COMMENT
Topic
Name
4+4 =