What is the function of a resistor in a circuit?
A resistor is a passive component in a circuit that opposes the flow of electric current, which can be used to adjust signal levels, divide voltages, limit current, and dissipate power as heat.