Full-time web dev; JS lover since 2002; CSS fanatic. #CSSIsAwesome
I try to stay up with new web platform features. Web feature you don't understand? Tell me! I'll write an article!
He/him
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) { ... }?
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) { ... }
?Input is 2D Array