Love-O-Meter from Arduino Projects Book

Hello everyone, I have a question related to the arduino starter kit project "Love-o-meter".

why are the 220 ohm resistors attached to the cathodes of the leds when the voltage/current flows through the anode of the leds?

I thought that the resistor goes through the anode to reduce the amount of voltage/current going through the led diode and prevent it from burning up.

Is it different when the led diode is connected directly to 5 volts and not a pin? Can someone explain?

It makes no difference which side of the LED the resistors are on. The resistors are still in the LED circuit and so are limiting the current flowing through it.

Steve

Note rule no. 1.