David Blaine Versus Invisible JavaScript
Description
A six-panel David Blaine street-magic meme shows him approaching two men and saying, "Hey fellas! I want to show you some street magic." The men respond with captions including "I know you are both frontend developers.", "Wait, how do you k... What the F!", and "He is David Blaine! Leave us alone!", before Blaine offers, "I will pay you $1000 if you solve a very simple JS expression that I printed out on paper." The printed code assigns values to `globalThis['\u115F']`, `globalThis['\u3164']`, `globalThis['\u1160']`, and `globalThis['\uFFA0']`, then shows a `console.log(` expression that visually appears to contain only operators and spaces: `+`, `*`, and `-`; the developers boast "Haha! You've already lost! We are super senior JS developers! We can solve any expression!" and then panic with "This is black magic! We hate you, David Blaine!" and "OMG! I can't calculate this expression!!!" The trick is that several Unicode filler characters can behave like distinct JavaScript identifiers while looking like whitespace, turning a seemingly impossible expression into valid, deeply cursed code.
Comments
16Comment deleted
JavaScript did not need invisible variable names, but apparently the grammar wanted its own escape room.
Whats the answer 🤔 Comment deleted
NaN? Comment deleted
7 Comment deleted
42 Comment deleted
ah, invisible symbols... well, we can't know their order, but assuming all 4 are actually used in the calculation, we can get any of: 0 8 10 12 28 32 40 42 48 Comment deleted
My favorite number: 5077073466685484917 8462080220627957062 Dont take it seriously. Comment deleted
I feel like an idiot. What does this mean? Comment deleted
A hint: indianness Comment deleted
ah Comment deleted
yeah, i am an idiot after all Comment deleted
💀😭😂 nah Comment deleted
kindly go fuck yourself Comment deleted
💀😂😭 Comment deleted
Tbh really surprised that still no one came to comments saying that correct answer is undefined Coz that’s what console.log evaluates to Comment deleted
Now I feel lost Comment deleted