2D-Arrays and the Power of Programmatic Constraints

2D-Arrays are essentially the naming equivalent of what “3D Touch” is to “super hard pressing”

To the computer a 2D array is simply arrays within an array, but to us humans it is more easily visualized as a grid system. It is also a highly effective layout system for games such as Tic-Tac-Toe and Battleship. In my experience this concept also pops up on coding challenges from time to time, but once you realize that initializing a coordinate is as simple as a for-loop within a for-loop, you’re in the clear 😎

Note: rowCounter counts down because, unlike programming languages, musical scales start at 1 and not 0 😉

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rob Deans

Rob Deans

Chronicling curiosities in Swift and Beyond ~ iOS Developer // Tech Talent Pipeline // Flatiron School Alumnus // Musician // NYC