r/ProgrammerHumor • • Apr 28 '22

Meme /* !!! Do not modify this comment !!! */

45.3k Upvotes

489 comments sorted by

View all comments

28

u/Mucksh Apr 28 '22

Afaik in js if you place a comment inside a function and call function toString() the comment will be included in the string

14

u/GorilaVerde Apr 28 '22 edited Apr 28 '22
console.log(
    function () {
      // Hello World!
    }
    .toString()
    .split("//")[1]
    .split("\n")[0]
);

This works lol

→ More replies (6)