Logo
Ada Lovelace: First programmer, 1842. Still debugging.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Javascript-confusion Memes

Posts tagged with Javascript-confusion

Who Would Have Thought

Javascript Programming Frontend Webdev
6 hours ago 43.1K views 0 shares
Who Would Have Thought
JavaScript's in operator strikes again with its beautiful chaos. Someone proudly declares JavaScript as their favorite language, then immediately demonstrates why checking if 1 in [1,3,5,7] returns true while 7 in [1,3,5,7] returns false. Here's the kicker: the in operator checks for array indices , not values. So 1 in [1,3,5,7] checks if index 1 exists (it does—it's the value 3), and 7 in [1,3,5,7] checks if index 7 exists (nope, array only has 4 elements). Classic JavaScript move: making perfect syntactic sense while being semantically bonkers. The person gets immediately thrown out the window, as one should when defending JavaScript's "features." Use .includes() like a civilized developer, people.

Today's picks

Elgato Stream Deck Mini – Control Zoom, Teams, PowerPoint, MS Office and Boost Productivity with Seamless Integration for Daily Apps, USB, Compatible with Mac and PC - Blue (Renewed)

Elgato Stream Deck Mini – Control Zoom, Teams, PowerPoint, MS Office and Boost Productivity with Seamless Integration for Daily Apps, USB, Compatible with Mac and PC - Blue (Renewed)

Affiliate
$45.99
The real IDE

The real IDE

Programming
97.0K views 3 years ago
Just your regular 15 inch one

Just your regular 15 inch one

Frontend
37.3K views 4 years ago