What is the primary function of a transformer in an electrical circuit?
A) To convert direct current (DC) to alternating current (AC)
B) To increase or decrease the voltage of alternating current (AC)
C) To store electrical energy for later use
D) To protect electrical circuits from overloads and short circuits