Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 445 Bytes

README.md

File metadata and controls

34 lines (28 loc) · 445 Bytes

Create a function, matrix_add(), that does the following:

Input:

  • array1: a multi-dimensional array
  • array2: a multi-dimensional array

Output:

  • output: a multi-dimensional array

Example:

var array1 = [ [1,2,3], [3,4,5], [6,7,8] ] var array2 = [ [1,2,3], [1,2,3], [1,2,3] ]

output = matrix_add(array1,array2); console.log(output); //outputs [ [2,4,6], [4,6,8], [7,9,11] ]

Put your solution in answer.js