Sony hdr-cx240e vs nikon d3100 for youtube?

I have the sony camcorder and the nikon d3100 but I don't know which one is better to use?
Fyi I want to use it for youtube videos

The sony camcorder will get you up and shooting video a lot faster and easier.
Make sure you use a good tripod, do a good 3-point light setup and use a external audio recorder so you can 'marry' the high quality audio to the video with editing software.
Watch the first 4 minutes of this video to perceive how the audio quality changes. The entire video is nice, but focus on the audio.

If you already have them both then try each one and decide which you like best beased on ease of use and quality of results.

ANY video camera will out-perform ANY stills camera when shooting video.