concept series circuit in category javascript

This is an excerpt from Manning's book JavaScript on Things: Hacking hardware for web developers.
This simple LED circuit (figure 3.13) is a series circuit. A series circuit has only one path for electrons—current, those individual flowing jellyfish of the gnome world—to take. Because there’s only one possible route, all jellyfish/electrons go through the whole route; they’re not able to wander off on some shortcut or side road. That means the current is the same at all points in the circuit (figure 3.13).
Figure 3.13. A series circuit has only one possible path for the charges (jellyfish) to flow through—there are no branches. The current is the same at any point in a series circuit, meaning that points 1, 2, 3, and 4 all have equal current.
![]()
When modifying the current of a series circuit with resistors, it doesn’t matter whether you use, say, one resistor rated at 200 V or two resistors at 100 V. The values of the resistors add together and modify the current across the whole circuit (figure 3.14).
In the simple LED series circuit you wired, all of the current runs through the LED, then through the resistor, and then to ground (figure 3.14). A single gap in a series circuit will cause the entire circuit to stop working, because it’s a gap in the only path through the circuit. That makes it possible to activate and deactivate the whole circuit with one switch.