Comment

Comment by empyrical

You really should not use this ever in any situation, but for historical reasons[1], if they are the only thing on the line you can use HTML comments in JavaScript like so:

  function foo() {
    <!--- returns true ---->
    return true;
  }
This works at least in Chrome and V8, not sure about Firefox.

[1] https://stackoverflow.com/a/1508005/1888964

parent empyrical 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton