Some bugs I had to fix for this challenge was making sure I used the portals at the right times. Some strategies I used was being careful to turn at the right time, because sometimes when I turn at the wrong time it messes up my whole run.
Here is the code I used for my challenge:
moveForward()
turnLeft()
moveForward()
turnRight()
moveForward()
turnRight()
moveForward()
turnRight()
moveForward()
turnLeft()
moveForward()
toggleSwitch()