JPEG is a highly compressed file with millions of less pixel information.
Just a nit. And note that this comes from someone that always shoots RAW (not even RAW + JPG).
But it is more fair to say "JPEG is the same number of pixels captured from the sensor, with all the same color and luminance information, but is compressed after the image is created in-camera (RGB sensor bits + camera settings) to create a smaller-sized image file that is completely processed."
"Highly compressed" isn't always the case. If you save a JPG to "full quality", you will create an image that is generally indistinguishable from a JPG created from the RAW file (assuming same basic picture settings). Or even when compared to a RAW image saved to another format that is non-lossy, such as TIFF, viewed on a screen at normal viewing magnification (meaning, you aren't zoomed into 200-400%).
You can use low quality JPG save setting, in which case the JPG will start looking inferior to an HQ JPG saved from RAW.
You can open a JPG, edit, and save many times and that process (uncompress, edit, recompress) will begin degrading the image over several saves, so that is not recommended for quality information. (This is the single reason that JPG gets a bad rap, because people see JPGs that are multiple generations down the line and can see obvious compression artifacts.)
But a 100% quality first generation JPG will look just fine, as long as you are happy with the general settings (do not need to edit to adjust white balance, contrast, etc.).
And RAW is still the best bet for those of us that like to tweak images in ways that just can't happen in-camera.
Chris