DEV Community

Discussion on: JavaScript Challenge #4

Collapse
kenbellows profile image
Ken Bellows

Ah, I see, you mean the square of numbers around the given value, in this case 10. I recommend wrapping your example array in a code block with triple backticks (check the formatting help of you don't know what I mean) to make it easier to understand what you mean.

So yeah, to repeat the second half of my question, is the input a 2-D array, or a 1-D array with a pair of dimension variables, e.g. function getSquare(arr, m, n, val) { ... }?

Collapse
kmk profile image
k@k Author

Input is 2D Array