I\'m having some trouble figuring out why I get an undefined error while looping.
I don\'t think it matters but I have two nested loops and a switch statement in the end.