If transistor is just like a switch, it shouldn't affect the led since it forms a closed loop with the battery. So why does the led turn on and off?
I am new to digital electronics(and electronics in general) any help is appreciated.
Thanks in advance.