DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
4+4 =
Submit