Codehs 8.1.5 Manipulating 2d Arrays =link= · Instant & Popular
What or incorrect outputs you are currently getting?
When submitting your code to the CodeHS autograder, watch out for these frequent mistakes: Codehs 8.1.5 Manipulating 2d Arrays
var grid = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; // add a new button to the grid grid.push([10, 11, 12]); // remove a button from the grid grid.splice(1, 1); console.log(grid); // output: [[1, 2, 3], [7, 8, 9], [10, 11, 12]] What or incorrect outputs you are currently getting
var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; array.splice(1, 1); // remove row at index 1 console.log(array); // output: [[1, 2, 3], [7, 8, 9]] // output: [[1
A: Usually yes, as long as it produces the correct result. But stick to the simplest solution (nested loops) to avoid overcomplicating.
console.log(rowString);