Bonus points for not just creating an image, but hiding the code steganographically in an existing image (ie only using the LSB of each pixel to hide code)!
function foo() {
/* ...characters for image data... /
bar();
/ ...more image data... */
The asterisks are not showing up but you get the idea. It checks out with the comments part of the javascript spec as well:
http://ecma-international.org/ecma-262/5.1/#sec-7.4
...as the text inside the comment can be any unicode code unit except for an asterisk (For source Character rules see http://ecma-international.org/ecma-262/5.1/#sec-6).
If you want to do something *f*a*n*c*y* put two spaces
at the front of the line, it will show up verbatim
including line breaks.