I am relatively new to electronics and only dabbled in high school with very simple circuits but I was doing an led project with neopixels and they wanted a capacitor on the positive and negative rails to stop an inrush of current to prevent damaging the first pixel.
"When using a DC power supply, or an especially large battery, we recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels. See the photo on the next page for an example."
The circuit above kind of shows what I mean, how come the electrons don't flow past the capacitor and too the led or is that a wrong assumption and electrons do flow past the capacitor and the capacitor just takes some of the energy?
If the electricity has to charge the capacitor first than what is stopping the current going past the capacitor.
I hope I worded that well. I apologise if I am not getting my point across.