Menu
Coddy logo textTech

Recap - 2D Arrays

Part of the Logic & Flow section of Coddy's JavaScript journey — lesson 9 of 65.

challenge icon

Challenge

Easy

Create a function mirrorRows that takes a 2D array matrix as an argument and returns a new 2D array in which each row is reversed.

Try it yourself

function mirrorRows(matrix) {
  // TODO: Return a new 2D array where each row is reversed.
}
// Do not write anything outside function

All lessons in Logic & Flow