Two ways to do it..........
One is a Series circuit, the other is a Parallel circuit.
Of course you can also use a Series/Parallel circuit.
Each LED has a Positive ( + ) connection, and a Negative ( - ) connection.
A) Series circuit:
One side of Switch is connected to Positive ( + ) of the Battery.
The other side goes to the Positive ( + ) of the first LED light.
Then the LED's are connected together in a Series.
Negative of first LED light to Positive of second LED light.
Negative of second LED light to Positive of third LED light.
Negative of third LED light to Positive of Fourth LED light.
And so on, and so on, until you come to No.40 LED light.
It's Negative connects to the Battery.
ONE LED goes bad, and none of them will work.
Old Christmas light strings are set up this way.
B) Parallel Circuit:
Switch to Battery - Positive ( + )
Wire goes from Switch, to 1st LED light's Positive connection ( + )
Then wire from 1st LED positive, to 2nd LED Positive ( + )
Then wire from 2nd LED Positive to 3rd LED Positive.
And so on, and so on, until you reach the 40th LED.
Then wire comes from Negative ( - ) of Battery, to Negative of 1st LED.
Wire from 1st LED to Negative of 2nd LED.
Wire from 2nd LED to Negative of 3rd LED.
Wire from 3rd LED to Negative of 4th LED.
And so on, and so on, until you reach 40th LED.
Wire connects to Negative of 40th LED. Then a wire connects from 40th LED Negative, and goes to Negative of Battery.http://en.wikipedia.org/wiki/Series_and_parallel_circuits
Over to the Left side you see the Battery symbol. There is no switch in this circuit.
In the Battery symbol, the Longer line represents the Positive pole.
Resistors are represented by the squiggly lines. In place of them put your LED lights.
A Switch would go in-between the Battery, and first LED light; on the Positive side.
(ALWAYS put the Switch on the Positive side. Can explain in detail if you need)
[The Top line in the diagram, is the Positive 'wire' ]http://www.autoshop101.com/trainmodules/elec_circuits/circ114.html
In a Parallel circuit, if one LED light goes out, the rest stay on.
For additional questions please post in a Comment.