Object.prototype.message='alert\x281337\x29';Array.prototype.toString=Error.prototype.toString;Error.prepareStackTrace = Function;const x = new Error;x.valueOf=x.stack;+x;
Well, that's a mouthful! So many years and JavaScript still can do the most amazing, weird, awesome, scary, obscure, and sexy things in the world of coding.
Doesn’t feel LLM-y to me. If it is LLM-generated, the LLM must have been explicitly instructed to ignore sentence capitalization and invent a persona (‘i chose...’).
This reminds me of "Creators admit Unix, C hoax" (e.g. https://www.gnu.org/fun/jokes/unix-hoax.html)
> We stopped when we got a clean compile on the following syntax:
I love this. This is a fun hack, but the article also hearkens back to pre-LLM days when people were still interested in _code_.
Off topic: This website looks like a ransom note
JavaScript is so cursed.
GPTzero says this entire thing is AI generated for those concerned.
Doesn’t feel LLM-y to me. If it is LLM-generated, the LLM must have been explicitly instructed to ignore sentence capitalization and invent a persona (‘i chose...’).
Aha, that's a great reassurance then! ;-)
The irony of using AI to determine if something was written by AI.
'tsAll Goodman.
What's the purpose of the +x at the end?
The unary plus implicitly converts an expression to a number, which calls `valueOf` for non-primitive values.
I think to implicitly trigger the valueOf function.