Skip to content
DevMeme
453 of 7435
JavaScript's Existential 'this' Crisis
Languages Post #522, on Aug 6, 2019 in TG

JavaScript's Existential 'this' Crisis

Why is this Languages meme funny?

Level 1: Who Are We Talking About?

Imagine you’re in a room and your friend shouts, “I’m done with this!” while throwing their hands up. Normally, you know they’re just upset with the situation. But what if you weren’t sure what they meant by "this"? Are they mad at the project you’re working on, the broken toy on the table, or the homework in front of them? You’d feel confused, right?

This meme is funny because it’s like that situation. In coding, JavaScript has a little word called this that should point to the thing you’re working with — but sometimes the computer isn’t sure what thing you mean. It’s as if you said "I hate this!" and the computer looks around and asks, "Hate what, exactly?" The developer in the joke wants to throw a fit (flip a table over, as people say when super frustrated) and yell a bad word about "this". But then they stop and think: “Hmm, in JavaScript, what does this actually refer to right now?” They’re so used to the code confusing them that it even spoils their angry outburst! 😂

In simple terms, it’s funny because the programmer’s brain can’t turn off thinking about code. Even when they try to express anger, they accidentally make a nerdy joke about the word "this". Anyone who’s ever been confused about something and gotten mad can relate a bit. Here, that something is just a tiny technical word that ended up causing a big silly misunderstanding.

Level 2: Which this Is This?

At its core, this meme highlights a language quirk in JavaScript that often trips up developers, especially those new to the language or coming from more predictable languages. Let’s break down what this actually means in JavaScript:

  • this (the keyword): In JavaScript, this is a special keyword that refers to an object that’s implicitly associated with the current function execution. However, unlike many languages where this reliably refers to the current class instance, JavaScript’s this can change depending on how a function is invoked. Think of this as a pronoun in a sentence – its meaning depends on context.
  • Context Binding: This is the concept of what object this is pointing to at any given time. The binding of this is determined when a function is called, not when it’s written. That’s why the meme says “I can never be sure what this refers to” – because without carefully tracking how a function runs, it’s easy to lose track of which context you’re in.

Here are a few common scenarios:

  • Global context: If you just call a regular function on its own (myFunc()), and you’re not in Strict Mode, this will default to the global object. In a browser, that's the window object (which has all your global variables and functions). In strict mode, calling myFunc() with no special context will make this be undefined instead (which is usually safer, to prevent accidental use of global).

  • Method call on an object: If you call a function as a method of an object, like obj.myMethod(), then inside that function, this will be obj. For example:

    const robot = {
      name: "Bender",
      introduce: function() {
        console.log("Hi, I'm " + this.name);
      }
    };
    
    robot.introduce(); // "Hi, I'm Bender"
    

    Inside introduce, this refers to robot, so this.name is "Bender". This is what developers expect this to do.

  • Lost or unbound function: If you detach that same method and call it without the object, the context is lost:

    const intro = robot.introduce;
    intro();  // In non-strict mode: prints "Hi, I'm undefined" (because this is window, and window.name might be undefined)
              // In strict mode: TypeError, because this is undefined
    

    Here this wasn’t robot anymore when intro() ran. It defaulted to the wrong thing (global or undefined). This is the kind of scenario that causes head-scratching bugs.

  • Using bind/call/apply: JavaScript lets you manually bind a function’s this to a specific object. For instance, const boundIntro = robot.introduce.bind(robot); ensures that whenever boundIntro() is called, this will be robot inside. Methods like .call() and .apply() do a one-time binding and invocation of a function with a chosen this. These are powerful tools, but if you forget to use them when needed, this might not be what you expect.

  • Arrow functions: Introduced in ES6, arrow functions (e.g. () => { ... }) do not have their own this. Instead, an arrow function permanently uses the this value from the surrounding scope (the context where the arrow function is defined). This is super helpful in many cases, because it means an arrow function used as a callback won’t accidentally change this. For example, in a class or object method, using an arrow function for an event handler will keep the original this:

    const greeter = {
      name: "Alice",
      greet: function() {
        setTimeout(() => {
          // Arrow function captures this from greet() context
          console.log("Hello, " + this.name);
        }, 100);
      }
    };
    greeter.greet(); // "Hello, Alice"
    

    If we had used a normal function in setTimeout here, this.name would likely have been undefined or something unintended, since a plain callback’s this isn’t bound to greeter by default. Arrow functions saved the day by preserving context.

The tweet’s joke is a play on all this confusion. The developer is saying they want to yell "Fuck this!" out of frustration. Normally, "this" in that sentence just means "this situation/codebug right here". But because JavaScript developers constantly have to think about what this is referencing in their code, the author humorously adds "...but I can never be sure what this refers to." It’s poking fun at how a frontend developer can’t even make a simple exasperated rant without accidentally thinking about JavaScript’s this binding rules!

This highlights a slice of DeveloperHumor where we laugh at our own troubles. Anyone who has tried to debug a JavaScriptEcosystem issue involving this has likely felt a bit of this developer rage. There’s even a well-known Stack Overflow question titled “What is the meaning of this in JavaScript?” because so many people get confused. It’s practically a rite of passage in learning JavaScript to exclaim "Why on earth is this not what I think it is?". The meme’s popularity (with over 1K retweets/likes) shows how common and relatable this pain point is. Even without the profanity, any coder sees the word “this” in quotes and instantly knows the meme is about that awkward JavaScript gotcha.

Additionally, the “table flipping” part of the meme — sometimes represented with the text emoticon (╯°□°)╯︵ ┻━┻) — is just an internet-famous way to show extreme frustration (imagine someone literally flipping a table over in anger). Pairing that with the this keyword confusion exaggerates the feeling: "I’m so mad I want to flip a table, but darn it, in JavaScript I even have to question what I'm flipping!" This blend of tech humor and everyday rage makes the meme a classic in programming circles.

Level 3: The Many Faces of this

In the realm of JavaScript, the this keyword can feel like a shapeshifting trickster. The tweet humorously nails a common frustration: wanting to flip the table in rage with a scream of "F*** this sh*t," only to realize you’re not even sure what this is pointing to at that moment. It’s a clever play on words, blending an everyday expression of anger with JavaScript’s infamous context binding problem. Every seasoned frontend developer has battled the JavaScript this keyword and come out the other side rubbing their temples. The joke lands because it’s too real: in JS, this isn’t just one thing – its value changes depending on how and where you use it.

Under the hood, this in JavaScript is determined by how a function is called, not where it’s defined. That’s a recipe for confusion:

  • Call a function as a plain func() in non-strict mode, and this becomes the global object (like the window in browsers, or undefined in strict mode). Surprise! You might be cursing "this" and find out it referred to the entire universe (or nothing at all in strict mode).
  • Use a function as a method, like obj.method(), and this is bound to obj – usually what you expect, if you remembered to call it correctly.
  • Borrow that method unbound (e.g. assign it to a variable let foo = obj.method; foo();), and suddenly this is lost in the void (defaulting to global or undefined). Now the code is complaining that it can't read property something of undefined, and you’re left debugging an existential mystery, asking "What is this here, really?"
  • Use .call or .apply, and you can manually set this – a power that’s both useful and another source of "Wait, what is this now?" headaches if misused.
  • Enter arrow functions (added in ES6): they don’t create their own this at all, instead capturing the this value of the surrounding scope. This was JavaScript’s belated band-aid for the pain – think of arrow functions as saying "I know dealing with this is rough, I'll just reuse the parent context so you don't lose your mind."

For senior developers, this tweet triggers knowing groans and chuckles. We've all been in “debugging hell”, logging console.log(this) all over the place to figure out what object we’re dealing with, especially in event callbacks or when using library functions that change context. The meme is a communal nod: Yep, been there, yelled "WTF is this?" at my screen. It pokes fun at how JavaScript’s flexible design (no strict object-oriented binding like in Java or C#) means this can be anything – which is powerful, but also a classic footgun. The LanguageQuirks of JavaScript’s design (born from its 10-day creation and evolving JavaScriptEcosystem over decades) left us with some odd rules. And the this keyword is probably the most well-known quirk of all.

Why is this so funny? Because the developer’s rage is literally self-referential. The phrase "F**k this" is normally just an angry idiom, but here it doubles as a tech inside-joke: in JavaScript, you can’t even be sure what “this” is when you say that! It’s a play on words that only works because of JavaScript’s confusing this. The tweet got over 1.2K retweets for a reason – it resonated with thousands of devs who have felt that exact mix of anger and confusion. It’s the kind of DeveloperHumor that makes you laugh, then cry a little inside, remembering the last time a this bug had you questioning your life choices at 3 AM. In JavaScript, context is everything, and losing track of this can turn a simple bug into an existential debugging crisis. No wonder many devs half-joke that "JavaScript is the only language where you can this yourself into complete confusion."

Description

A screenshot of a tweet by a user named Ölbaum (@oscherler), posted on October 30, 2015. The tweet says, 'JavaScript makes me want to flip the table and say “Fuck this shit”, but I can never be sure what “this” refers to.' This is a classic and highly praised joke within the developer community. It cleverly creates a pun by contrasting the colloquial use of 'this' in a moment of frustration with the notoriously ambiguous and context-dependent 'this' keyword in JavaScript. For senior developers, this joke is a perfect encapsulation of the language's historical quirks, recalling countless hours spent debugging why 'this' was not referring to the expected object, especially before the widespread adoption of arrow functions which provide lexical scoping for 'this'

Comments

7
Anonymous ★ Top Pick In JavaScript, 'this' is the ultimate commitment issue. It's bound to whatever called it last, unless it's an arrow function, in which case it's bound to its parent, unless you explicitly use .bind(), in which case... you know what, just use Rust
  1. Anonymous ★ Top Pick

    In JavaScript, 'this' is the ultimate commitment issue. It's bound to whatever called it last, unless it's an arrow function, in which case it's bound to its parent, unless you explicitly use .bind(), in which case... you know what, just use Rust

  2. Anonymous

    JavaScript’s ‘this’ is the only engineer who shows up to stand-up with a different manager every day - strict mode makes them unemployed, arrow functions put them on permanent remote, and call/apply list them as contractors

  3. Anonymous

    The real tragedy is explaining to the new hire why we have seventeen different bind(), call(), and arrow function patterns in the same codebase because each developer had their own "foolproof" solution to the this problem

  4. Anonymous

    The beauty of JavaScript's 'this' is that it's simultaneously the most important keyword in the language and the one you can never trust - kind of like that senior architect who insists their 15-year-old framework choice was 'future-proof.' At least with arrow functions, we finally got a way to say 'just use lexical scope and stop making me think about call-site binding at 2 AM during an incident.'

  5. Anonymous

    JavaScript: saying “this is broken” triggers a postmortem on call‑site semantics, ends with arrow functions, and somehow still binds me to the incident

  6. Anonymous

    JS 'this' is like a distributed system's eventual consistency: you think it's settled, then a callback flips the context

  7. Anonymous

    JS 'this' has more deployment modes than our microservices: global, implicit, new, explicit, and arrow - choose wrong and you’re on-call for metaphysics

Use J and K for navigation