Skip to content
Advertisement

Two 2d Arrays Sum

I’m trying to take two 2d array inputs, and then add them together, but it won’t compile correctly. For some reason if i declare the ‘addedMatrix’ outside of the method the code compiles but the addedMatrix is blank

Heres what I have so far :

JavaScript

Advertisement

Answer

Your syntax is wrong completely firstly you need a main function and then you also need to accept the return type.

JavaScript
Advertisement