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\$
3
  • 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
    Commented Jul 24, 2017 at 17:03
  • 1
    \$\begingroup\$ Multiple people can post cracks to the same cop submission... Please define different. \$\endgroup\$
    – Dennis
    Commented Jul 25, 2017 at 13:41
  • \$\begingroup\$ @NoOneIsHere codegolf.meta.stackexchange.com/q/13437/58826 \$\endgroup\$
    – user58826
    Commented Jul 25, 2017 at 15:26

144 Answers 144

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

Add++, caird coinheringaahing

The empty input. The answer is pretty pointless, since it never runs in an infinite loop.

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Node.JS, programmer5000

x = {}
x.constructor = false
f(x)

We define an object where x.constructor is false so it terminates immediately

TIO

\$\endgroup\$
0
\$\begingroup\$

Python 3, Erik Brody Dreyer

While error raising cracks are 10 a penny, a simple non-erroring one is just 88 zeros in a row:

def fun(n):
while not (int(n[17]+n[:17])==2*int(n[:18]) and int(n[45]+n[18:45])==3*int(n[18:46]) and int(n[87]+n[46:87])==5*int(n[46:88])):
    print("Ha")
fun("0"*88)
print("halted and did not error")

Try it online!

\$\endgroup\$
0
\$\begingroup\$

JavaScript (Node.js), programmer5000

Object.defineProperty(a={},"__proto__",{value:false,writable:false})

Try it online!

Simple enough. A truthy object who's __proto__ is defined to be false permanently.

\$\endgroup\$
0
\$\begingroup\$

Braingolf, Mayube

Answer

163

Code explanation:

1+[#£-0!e>:$_1>|]

1+                  # Add 1 to the input
  [             ]   # While bottom of the stack > 0..
   #£               #   Push 163
     -              #   Subtract from the input
      0             #   Push 0
       !            #   Peek top of the stack 
        e           #   If greater than zero, do..
         >          #     Rotate the stack one to the right
          :         #   Else..
           $_       #     Discard top of the stack
             1      #     Push
              >     #     Rotate the stack one to the right
               |    #   End ifelse

Which results in outputting 0.

Try it online!

\$\endgroup\$
8
  • \$\begingroup\$ Woop! You got it! Fyi 163 is the Unicode codepoint of £ \$\endgroup\$
    – Mayube
    Commented Jul 24, 2017 at 18:18
  • \$\begingroup\$ @Mayube Yeah, just running alone gave it a bit away :p. \$\endgroup\$
    – Adnan
    Commented Jul 24, 2017 at 18:22
  • \$\begingroup\$ Darn! I actually tested 163 as an argument and it didn't work at all! \$\endgroup\$ Commented Jul 24, 2017 at 19:58
  • \$\begingroup\$ @EriktheOutgolfer then you did something wrong, it's taken as an argument \$\endgroup\$
    – Mayube
    Commented Jul 24, 2017 at 20:09
  • \$\begingroup\$ @Mayube I just passed in 163...maybe I saw something wrong. \$\endgroup\$ Commented Jul 24, 2017 at 20:09
0
\$\begingroup\$

JavaScript (Babel Node), programmer5000

new Set() was posted as a crack but didn't work for me (Try it online!), so I made one that doesn't throw, but does create a TypeError.

let f=x=>{while(x+"h");}
class Halt {
    toString() {
	return {}
    }
}
f(new Halt())

Try it online!

P.S. The solution I really wanted was to negate the charCode somehow and be errorless but I couldn't get that to not resolve to concatenation. :)

EDIT: An more modern alternative:

f( {
    [Symbol.toPrimitive] (hint) {
        return {}
    }
} )
\$\endgroup\$
3
  • \$\begingroup\$ Good, but still not desired! \$\endgroup\$
    – user58826
    Commented Jul 25, 2017 at 1:19
  • \$\begingroup\$ So there's an error-free solution? \$\endgroup\$ Commented Jul 25, 2017 at 1:21
  • 1
    \$\begingroup\$ A solution that doesn't use throw. \$\endgroup\$
    – user58826
    Commented Jul 25, 2017 at 1:22
0
\$\begingroup\$

JavaScript (browser), tsh

document.all

I started trying falsy values. document.all did the job.

\$\endgroup\$
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!

\$\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.

\$\endgroup\$
0
\$\begingroup\$

JavaScript (Node.js) by Alex Varga

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

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ yep. golfed a little: {valueOf:()=>this.q?0:this.q=1} \$\endgroup\$
    – Alex Varga
    Commented Jul 26, 2017 at 15:09
0
\$\begingroup\$

R, Gregor

expression(set.seed(5))

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

Try it online.

\$\endgroup\$
0
\$\begingroup\$

R, Jarko Dubbeldam

just break out of the while loop

expression(break)
\$\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!

\$\endgroup\$
3
  • \$\begingroup\$ I guess that's the intended solution. f(quit()) would also work \$\endgroup\$
    – Rift
    Commented Jul 26, 2017 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
    Commented Jul 27, 2017 at 7:41
  • \$\begingroup\$ Both solutions are evaluated in the function body. \$\endgroup\$
    – Rift
    Commented Jul 27, 2017 at 8:05
0
\$\begingroup\$

CPython 3.6, by wizzwizz4

1/0

Almost certainly not the intended solution, but it works

\$\endgroup\$
0
0
\$\begingroup\$

SmallTalk, Yimin Rong

1086

I should have trusted him.

\$\endgroup\$
0
\$\begingroup\$

JavaScript, Birjolaxew

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

JavaScript (ES7), iovoid

46474849

WolframAlpha made the calcs trivial.

\$\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.

\$\endgroup\$
3
  • \$\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
    Commented Jul 27, 2017 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
    Commented Jul 27, 2017 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\$ Commented Jul 29, 2017 at 4:57
0
\$\begingroup\$

JavaScript, Birjolaxew

new Proxy({},{get(){throw''}})
\$\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.

\$\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.

\$\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?

\$\endgroup\$
1
  • \$\begingroup\$ Never thought about bruteforcing, actually. \$\endgroup\$
    – MilkyWay90
    Commented Dec 20, 2018 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
\$\endgroup\$
0
\$\begingroup\$

JavaScript (Node.js), programmer5000

null

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

undefined also works.

\$\endgroup\$
1 2 3 4
5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.