I have built the following circuit (obtained from Electronics All-in-One For Dummies (For Dummies 2nd Edition))
It works quite well. When the the momentary button (normally open) is not pushed the LED is on.
When I push the button, I see the LED turn off.
However, for a bit I accidentally had my 2n2222a NPN BJT transistor (datasheet) oriented backwards so that :
- the emitter was connected to the LED
- and the collector was connected to ground
The circuit still worked exactly as expected.
Can someone explain why it would still work the same with the transistor in the incorrect orientation?