Skip to content

Comment on A technique for hiding your JavaScript codeparent

Comments

Comments should make it fairly straightforward to accomplish:

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 asterisks to show up, * put a space on both sides.

  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.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.