A **resistor** works in both **AC (Alternating Current)** and **DC (Direct Current)** circuits.
- **In DC circuits**, a resistor limits the flow of electric current. The current flows in one direction, and the resistor simply resists the flow of electrons, converting electrical energy into heat.
- **In AC circuits**, a resistor still resists the current flow, just like in DC circuits, but with alternating current, the direction of current changes periodically. The resistor doesn't affect the frequency of the AC signal; it only limits the amount of current based on the voltage applied, just like in DC.
So, a resistor is **neither AC nor DC** by itself — it is just a component that behaves the same way in both types of circuits.