47
\$\begingroup\$

This is the robbers' thread. The cops' thread is here.

Your challenge is to crack a cop's submission by finding an input that makes it halt. You don't have to find out why, or all inputs that make it halt if there's more than one, or the input the cop intended, just one input will do.

Once you have cracked a submission, post a link to it in a comment or edit to the cop's post. You can also flag your submission for a mod to edit it in the cop's post. Also, post the input used and a link to the cop's post in an answer in this thread. The robber that cracks the most submissions wins.

Multiple people can post cracks to the same cop submission, as long as they are different.

(If SE converted your duplicate answer to a comment, you may want to vote on this feature request)


Looking for uncracked submissions?

fetch("https://api.stackexchange.com/2.2/questions/135363/answers?order=desc&sort=activity&site=codegolf&filter=!.Fjs-H6J36vlFcdkRGfButLhYEngU&key=kAc8QIHB*IqJDUFcjEF1KA((&pagesize=100").then(x=>x.json()).then(data=>{var res = data.items.filter(i=>!i.body_markdown.toLowerCase().includes("cracked")).map(x=>{const matched = /^ ?##? ?(?:(?:(?:\[|<a href ?= ?".*?">)([^\]]+)(?:\]|<\/a>)(?:[\(\[][a-z0-9/:\.]+[\]\)])?)|([^, ]+)).*[^\d](\d+) ?\[?(?:(?:byte|block|codel)s?)(?:\](?:\(.+\))?)? ?(?:\(?(?!no[nt][ -]competing)\)?)?/gim.exec(x.body_markdown);if(!matched){return;}return {link: x.link, lang: matched[1] || matched[2], owner: x.owner}}).filter(Boolean).forEach(ans=>{var tr = document.createElement("tr");var add = (lang, link)=>{var td = document.createElement("td");var a = document.createElement("a");a.innerText = lang;a.href = link;td.appendChild(a);tr.appendChild(td);};add(ans.lang, ans.link);add(ans.owner.display_name, ans.owner.link);document.querySelector("tbody").appendChild(tr);});});
<html><body><h1>Uncracked Submissions</h1><table><thead><tr><th>Language</th><th>Author</th></tr></thead><tbody></tbody></table></body></html>

\$\endgroup\$
  • 2
    \$\begingroup\$ Does different mean different inputs (say, all inputs ending with 2 crack the cop's post - can you different people post different numbers ending in 2?) or different families of inputs, or different types of inputs? \$\endgroup\$ – Stephen Jul 24 '17 at 17:03
  • 1
    \$\begingroup\$ Multiple people can post cracks to the same cop submission... Please define different. \$\endgroup\$ – Dennis Jul 25 '17 at 13:41
  • \$\begingroup\$ @NoOneIsHere codegolf.meta.stackexchange.com/q/13437/58826 \$\endgroup\$ – programmer5000 Jul 25 '17 at 15:26

139 Answers 139

1 2 3 4
5
1
\$\begingroup\$

Python 3 by Veedrac

A single 0xff byte for UTF-8, or anything else that cannot be decoded by the selected encoding.

Try it online!

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

05AB1E, MilkyWay90

1

TIO

Pretty easy one, all I had to do was look up the command list for the language.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Yeah, my one was easy to crack. \$\endgroup\$ – MilkyWay90 Dec 19 '18 at 3:02
  • \$\begingroup\$ @MilkyWay90 Nothing wrong with that, either. \$\endgroup\$ – Draco18s no longer trusts SE Dec 19 '18 at 3:23
  • \$\begingroup\$ Okay, thank you! I have another answer that you could crack (A BrainF one) \$\endgroup\$ – MilkyWay90 Dec 19 '18 at 3:25
  • \$\begingroup\$ @MilkyWay90 I don't know anything about-- \$\endgroup\$ – Draco18s no longer trusts SE Dec 19 '18 at 3:28
  • \$\begingroup\$ Oh, okay. I didn't know anything about it until today so... \$\endgroup\$ – MilkyWay90 Dec 19 '18 at 3:28
0
\$\begingroup\$

JavaScript (Node.js), Step Hen

Array(4) works because it is creating an empty array of size 4 and the string representation of that is ,,,.

Try it online!

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Java 8, Socratic Phoenix

These anonymous class answers are getting a bit overdone, but it works and I have no shame.

import java.util.ArrayList;

// ...

new ArrayList<Object>() {
    public boolean isEmpty() {
        boolean ret = !super.isEmpty();
        add(new Object());
        return ret;
    }
}

You can avoid the import if you're patient enough to build out all the List methods. I'm not.

Try it online.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

JavaScript (Node.js) by Alex Varga

({toString(){return this.t--;},t:1})

Try it online!

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ yep. golfed a little: {valueOf:()=>this.q?0:this.q=1} \$\endgroup\$ – Alex Varga Jul 26 '17 at 15:09
0
\$\begingroup\$

R, Gregor

expression(set.seed(5))

Similar principle to my other R answer. Seems to work.

Try it online.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

R, Jarko Dubbeldam

just break out of the while loop

expression(break)
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

R, Jarko Dubbeldam

it's my first time that I participated at something like this... hope i got it right.

.Internal(.invokeRestart(list(NULL, NULL), NULL))

Try it online!

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I guess that's the intended solution. f(quit()) would also work \$\endgroup\$ – Rift Jul 26 '17 at 15:30
  • 1
    \$\begingroup\$ This is not really a crack. Both this solution and @Rift quit before (or regardless of) evaluating the function. \$\endgroup\$ – JAD Jul 27 '17 at 7:41
  • \$\begingroup\$ Both solutions are evaluated in the function body. \$\endgroup\$ – Rift Jul 27 '17 at 8:05
0
\$\begingroup\$

CPython 3.6, by wizzwizz4

1/0

Almost certainly not the intended solution, but it works

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

SmallTalk, Yimin Rong

1086

I should have trusted him.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

JavaScript, Birjolaxew

Object.freeze({[Symbol.toPrimitive]() { raise; }})
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ raise isn't a JS keyword, you might be looking for throw \$\endgroup\$ – SuperStormer Jul 27 '17 at 1:26
  • 1
    \$\begingroup\$ @SuperStormer Doesn't matter anyway :P. \$\endgroup\$ – Veedrac Jul 27 '17 at 1:26
0
\$\begingroup\$

JavaScript (ES7), iovoid

46474849

WolframAlpha made the calcs trivial.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

JavaScript (ES7), Step Hen

I've found 5 solutions that work, so far:

[]

new Array()

Array.prototype

String.prototype

Number.prototype

Strangely, Object.prototype doesn't work.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Oh, I completely forgot that that is basically the same as my intended solution. I'd love for you to figure out why though :P it's a really weird perk of floats I just discovered \$\endgroup\$ – Stephen Jul 27 '17 at 16:45
  • \$\begingroup\$ I'll come back to it in the morning, @StepHen; I'm about to pack up for the day. \$\endgroup\$ – Shaggy Jul 27 '17 at 16:46
  • \$\begingroup\$ I'll tell you why. Check Boolean(input) and Number(input) for each of those as input. The "weird perk of floats" is that the exponentiation operator ** will convert any left operand, even something that coerces to NaN, into 1 if the right operand coerces to 0. Since Number(Object.prototype) is NaN and not 0 like the rest of the working inputs, it will not work. \$\endgroup\$ – Patrick Roberts Jul 29 '17 at 4:57
0
\$\begingroup\$

JavaScript, Birjolaxew

new Proxy({},{get(){throw''}})
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Befunge 93, Dopapp

<

The code calculates (ord(input) - 3*4*5) / 0 = (ord(input) - 60) / 0, which gives Infinity or -Infinity for any ascii value ≠60 and NaN for ascii value 60 (<) on the linked interpreter. The part #v_@ only terminates if the top value of the stack is falsy, which is only the case for NaN.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Python3, by AlexHall

Probably not what OP had in mind:

help.__doc__

Here's a test on my system:

Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 12:22:00) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
>>> s = "help.__doc__"
>>> len(s)
12
>>> eval(s)
"Define the builtin 'help'.\n\n    This is a wrapper around pydoc.help that provides a helpful message\n    when 'help' is typed at the Python interactive prompt.\n\n    Calling help() at the Python prompt starts an interactive help session.\n    Calling help(thing) prints help for the python object 'thing'.\n    "
>>> len(eval(s))
307

It doesn't work with Python2 on my system.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

BrainF, MilkyWay90

0

I brute forced this one. My first guess was correct. And two subsequent inputs to make sure I was right.

Oops?

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Never thought about bruteforcing, actually. \$\endgroup\$ – MilkyWay90 Dec 20 '18 at 0:13
0
\$\begingroup\$

JavaScript (Node.js)

I've done some research, and find out that JavaScript that only uses ()[]+! is called JSFuck. With the help of JScrewIt and JS Minify, I've found the solution:

"[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]][([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+[!![]+!![]+!![]]]+(![]+[])[+!![]]+(![]+[])[!![]+!![]])()(([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]()[+!![]+[!![]+!![]]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]][([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(!![]+[])[(![]+[])[!![]+!![]+!![]]+([][[]]+[])[+[]]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]]()[+!![]+[+[]]]+![]+(!![]+[])[(![]+[])[!![]+!![]+!![]]+([][[]]+[])[+[]]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]]()[+!![]+[+[]]])()[([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]](([]+[])[(![]+[])[!![]+!![]+!![]]+([][[]]+[])[+[]]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]]()))[+!![]+[+[]]]+([][[]]+[])[+[]]+(!![]+!![]+[])+(!![]+!![]+!![]+!![]+!![]+!![]+[])+(+[]+[])+(!![]+!![]+!![]+!![]+!![]+!![]+[])+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]()[+!![]+[!![]+!![]]])+(([]+[]+[]+[]+[]+[]+[]+[]+[]+[]))"

Try it online!

Explanation

[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]][([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+[!![]+!![]+!![]]]+(![]+[])[+!![]]+(![]+[])[!![]+!![]])()( // eval function, copied from https://jscrew.it/ with only Node.js support
                                                                                                                        // '"'
    ([]+[])[                                                                                                                // ''['fontcolor']() == '<font color="undefined"></font>'
        (![]+[])[+[]]+                                                                                                          // f
        (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+              // o
        ([][[]]+[])[+!![]]+                                                                                                     // n
        (!![]+[])[+[]]+                                                                                                         // t
        ([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+             // c
        (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+              // o
        (![]+[])[!![]+!![]]+                                                                                                    // l
        (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+              // o
        (!![]+[])[+!![]]                                                                                                        // r
    ]()[                                                                                                                    // ''['fontcolor']()['12'] == 'u'
        +!![]+                                                                                                                  // 1
        [!![]+!![]]                                                                                                             // 2
    ]+
    (                                                                                                                   // '\\'
        +[![]]+                                                                                                             // NaN
        [][                                                                                                                 // []['fill']
            (![]+[])[+[]]+                                                                                                      // f
            ([![]]+[][[]])[+!![]+[+[]]]+                                                                                        // i
            (![]+[])[!![]+!![]]+                                                                                                // l
            (![]+[])[!![]+!![]]                                                                                                 // l
        ][                                                                                                                  // []['fill']['constructor']
            ([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+         // c
            (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+          // o
            ([][[]]+[])[+!![]]+                                                                                                 // n
            (![]+[])[!![]+!![]+!![]]+                                                                                           // s
            (!![]+[])[+[]]+                                                                                                     // t
            (!![]+[])[+!![]]+                                                                                                   // r
            ([][[]]+[])[+[]]+                                                                                                   // u
            ([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+         // c
            (!![]+[])[+[]]+                                                                                                     // t
            (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+          // o
            (!![]+[])[+!![]]                                                                                                    // r
        ](                                                                                                                  // []['fill']['constructor']('return/false/')() == /false/
            (!![]+[])[+!![]]+                                                                                                   // r
            (!![]+[])[!![]+!![]+!![]]+                                                                                          // e
            (!![]+[])[+[]]+                                                                                                     // t
            ([][[]]+[])[+[]]+                                                                                                   // u
            (!![]+[])[+!![]]+                                                                                                   // r
            ([][[]]+[])[+!![]]+                                                                                                 // n
                                                                                                                                // /
            (!![]+[])[                                                                                                              // 'true'['sub']() == '<sub>true</sub>'
                (![]+[])[!![]+!![]+!![]]+                                                                                               // s
                ([][[]]+[])[+[]]+                                                                                                       // u
                (                                                                                                                       // b
                    [][                                                                                                                     // []['entries']
                        (!![]+[])[!![]+!![]+!![]]+                                                                                              // e
                        ([][[]]+[])[+!![]]+                                                                                                     // n
                        (!![]+[])[+[]]+                                                                                                         // t
                        (!![]+[])[+!![]]+                                                                                                       // r
                        ([![]]+[][[]])[+!![]+[+[]]]+                                                                                            // i
                        (!![]+[])[!![]+!![]+!![]]+                                                                                              // e
                        (![]+[])[!![]+!![]+!![]]                                                                                                // s
                    ]()+                                                                                                                    // []['entries']() == Object [Array Iterator] {}
                    []                                                                                                                      // []['entries']() + [] == '[object Array Iterator]'
                )[!![]+!![]]                                                                                                                // '[object Array Iterator]'[2] == 'b'
            ]()[+!![]+[+[]]]+                                                                                                       // '<sub>true</sub>'[10] == '/'
            ![]+                                                                                                                // 'false'
            (!![]+[])[                                                                                                          // / (see above)
                (![]+[])[!![]+!![]+!![]]+
                ([][[]]+[])[+[]]+
                (
                    [][
                        (!![]+[])[!![]+!![]+!![]]+
                        ([][[]]+[])[+!![]]+
                        (!![]+[])[+[]]+
                        (!![]+[])[+!![]]+
                        ([![]]+[][[]])[+!![]+[+[]]]+
                        (!![]+[])[!![]+!![]+!![]]+
                        (![]+[])[!![]+!![]+!![]]
                    ]()
                    +[]
                )[!![]+!![]]
            ]()[+!![]+[+[]]]
        )()[                                                                                                                // /false/['constructor']
            ([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+         // c
            (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+          // o
            ([][[]]+[])[+!![]]+                                                                                                 // n
            (![]+[])[!![]+!![]+!![]]+                                                                                           // s
            (!![]+[])[+[]]+                                                                                                     // t
            (!![]+[])[+!![]]+                                                                                                   // r
            ([][[]]+[])[+[]]+                                                                                                   // u
            ([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+         // c
            (!![]+[])[+[]]+                                                                                                     // t
            (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+          // o
            (!![]+[])[+!![]]                                                                                                    // r
        ](                                                                                                                  // /false/['constructor']('<sub></sub>') == /<sub><\/sub>/
            ([]+[])[
                (![]+[])[!![]+!![]+!![]]+                                                                                       // s
                ([][[]]+[])[+[]]+                                                                                               // u
                (                                                                                                               // b
                    [][
                        (!![]+[])[!![]+!![]+!![]]+
                        ([][[]]+[])[+!![]]+
                        (!![]+[])[+[]]+
                        (!![]+[])[+!![]]+
                        ([![]]+[][[]])[+!![]+[+[]]]+
                        (!![]+[])[!![]+!![]+!![]]+
                        (![]+[])[!![]+!![]+!![]]
                    ]()+[]
                )[!![]+!![]]
            ]()                                                                                                                 // '<sub></sub>'
        )
    )[+!![]+[+[]]]+                                                                                                         // 'NaN/<sub><\\/sub>/'[10] == '\\'
    ([][[]]+[])[+[]]+                                                                                                   // u
    (!![]+!![]+[])+                                                                                                     // 2
    (!![]+!![]+!![]+!![]+!![]+!![]+[])+                                                                                 // 6
    (+[]+[])+                                                                                                           // 0
    (!![]+!![]+!![]+!![]+!![]+!![]+[])+                                                                                 // 6
    ([]+[])[                                                                                                            // '"'
        (![]+[])[+[]]+
        (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+
        ([][[]]+[])[+!![]]+
        (!![]+[])[+[]]+
        ([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+
        (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+
        (![]+[])[!![]+!![]]+
        (!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+
        (!![]+[])[+!![]]
    ]()[
        +!![]+
        [!![]+!![]]
    ]
)+
(([]+[]+[]+[]+[]+[]+[]+[]+[]+[]))                                                                                       // Padding to 4321 characters
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

JavaScript (Node.js), programmer5000

null

! > Will cause an error "TypeError: Cannot read property 'constructor' of null".

undefined also works.

| improve this answer | |
\$\endgroup\$
1 2 3 4
5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.