Is a Nikon D3100 better than a Nikon D40?

I'm new to this and I was just wondering…
Also what's the difference and how much do they usually go for?
Best answer gets 10 points.

Yes, much better. Better sensor, better image quality, especially at low ISO, higher resolution, shoots video, has live-view, bigger LCD. Http://snapsort.com/compare/Nikon_D3100-vs-Nikon_D40

The Nikon D40 was discontinued a couple years ago. The Nikon D3100 has Live View and video capability - two features the D40 didn't have. The D3100 is being replaced by the D3200.
As with all Nikon entry-level DSLR cameras the D3100, D3200, D5100 and D5200 all require use of Nikon's more expensive AF-S lenses if you want auto focus. The D90 and D7000 are the lowest-priced Nikon models with a focusing motor in the camera body with those models you can use the less expensive AF lenses. Its a win-win situation for Nikon. Pay less for the camera body and more for lenses or pay more for the body and less for lenses.

I have a D40 and a D5100. Here in the US, the 3100 can be hadn for $479 and the $5100 for $549. The D40 was a good camera in its day and is still a good one, but the 5100 has very much better low light noise control. No comparison actually. I've never used a 3100, but I suspect its much better than the D40 as well in low light.
If you can spring for the extra $80, the 5100 has far more features than the 3100.
- Is the Nikon d3000 better than the d40?
- Is the nikon d60 better than the d40? - 2
- Nikon D40 better than Canon EOS REBEL T1i?
- Is Nikon or canon better? And what dslr is a good starting camera, something better than t3i or t5i to start with?
- Disregarding megapixels, is the nikon d3100 much better than the d5000?