Logo
git fire - For when your code is literally on fire.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • Csharp Csharp
  • All Categories

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

Weird-javascript Memes

Posts tagged with Weird-javascript

JavaScript Is Weird

Javascript Programming Frontend Webdev
4 hours ago 66.2K views 0 shares
JavaScript Is Weird
So you're telling me that adding the string 'b' to 'a' twice, then adding 'a' twice more, and calling toLowerCase() somehow produces "banana"? Yeah, that tracks. JavaScript's type coercion is basically that friend who always "helps" by making things infinitely more confusing. Here's what's happening: 'b' + 'a' gives you "ba". Then + + converts the next 'a' to NaN (because unary plus on a string that's not a number = NaN). "ba" + NaN = "baNaN". Add another 'a' and you get "baNaNa". Call toLowerCase() and boom—"banana". It's like JavaScript is gaslighting you into thinking this makes sense. The real question is: who discovered this, and what were they doing at 3 AM to stumble upon it?

Spotlight

GearScouts.com

Stop scrolling, start exploring! Find the gear that'll get you off the couch and into the wild. Compare power stations for off-grid adventures, flashlights for midnight hikes, and essentials that make the outdoors your playground. Get Outside →

Mount-It! CLiX Series Dual Monitor Desk Mount w...

Mount-It! CLiX Series Dual Monitor Desk Mount w...
Ad Your purchase helps us maintain our collection of 'It's not a bug, it's a feature' documentation. 📚