Simplifying Your Code
Simplify your code block so it isn’t so long and repetitive. Make your if statement shorter. Change it so you are using one loop, rather than two, to check the rows and columns. Remember this is a normal part of coding.
See the Pen M1 GB7 by Walker Books UK (@walkerbooks) on CodePen.