Need help with loops and switches

pinMode(switchPin, INPUT_PULLUP); // connect the switch between pin and ground (no resistor)

Did you do that?

Leo..