Is This A Good Price For Cookies

Is This A Good Price For Cookies
nan-memes, javascript-memes, bugs-memes, production-memes, type-coercion-memes | ProgrammerHumor.io

When the pricing system returns NaN instead of an actual number, so now these cookies cost "Not a Number" pounds. Classic JavaScript moment right there. Someone probably tried to do math on undefined, divided by zero, or parsed a string that definitely wasn't a number.

The best part? The label printed successfully and nobody caught it before it hit the shelf. Production bugs hitting different when they're literally on display in a grocery store. Somewhere, a developer is getting a Slack message with a photo attached and their stomach just dropped.

Fun fact: NaN is technically a number type in JavaScript, but typeof NaN === "number" returns true. Because of course it does.

More Like This