General Purpose Transistor and Diode, Basic Understanding:
Some of the circuit that use for signal switching or as on/off LED application or etc. You actually can see this transistor as general purpose transistor. For example if you find a circuit using 2N222, you can exchange to use it with 2N3904. Just see them only as NPN transistor, that why you exchange it. Figure below see the example of application that using general purpose transistor:
General Purpose Transistor to ON the LCD Backlight
General Purpose Transistor to Energize the Relay
General Purpose Transistor to Invert Signal
Generally, all the above application can use the 2N3904 NPN transistor. This reading are also applicable for general purpose diode.