Cannot locate the issue that makes it infinite loop and crash every time it's run
You need to use a different variable for the checkers iterator than you use for the other 2 iterators. At the moment, you're changing the i from checkers with the iterators from oddWidth and evenWidth, since they are nested.
Also, when ran like that you'll notice your next issue: line1 and line2 don't flush with each height. You'll have to reset them with every iteration of checkers.
@ColeAmodeo One more thing I'd note is that you can use the same variable but in JS you need to use
let to declare them, otherwise they are globally scoped - meaning, they represent the same variable everywhere. if you use
let i = 1; i <= width; i++, then the variable
i will only exist within the
for loop it was defined in, making it incapable of interfering with an
i that exists in, say, another function.