Ah, the meme that is actually only funny to people who know what it means... I could show my mom some of these and she would laugh. I'd be the only one laughing at this one XD
I started with JS about 10 years ago and I fell in love with it (even though it can be weird 😅). I had step backs in my career that ended up being good. Currently I'm a passionate front-end developer.
Then stuff like this happen: ZeroToHeroGuy79: “Wait a minute cowboy! You didn't do type verification on this one, better try this one:”
if (typeofx=="number"){returnx%2!==0}else{throwTypeError(`Value on x is not a number, is: ${typeofx}`)}
But then someone will tell you:
Brogrammer1024: hol'up brother! typeof is not that reliable, and you can not trust the user, NaN values (Not a number) are considered numbers with typeof and that method will always return true.
DarkDenoBunVader4: “Yeah, the same will happen with Infinity and -Infinity”
Better try this one:
if (typeofx=="number"&&!isNaN(x)&&isFinite(x)){returnx%2!==0}else{throwTypeError(`Value on x is not a valid number`)}
Too real...
Oh no, this is me!
repurposing my greatest reddit achievement

Was going through my screenshots and found this gem lol🫣
I used AI to generate a DEV post!
Let's kick things off with this week's awful AI-generated meme
Don't you just lche it?
so nus libdares to use! I lche ipen source so much. Oio source is so much better.
These Irish developers…
Ah, the meme that is actually only funny to people who know what it means... I could show my mom some of these and she would laugh. I'd be the only one laughing at this one XD
Nah, I think there are many devs that worked with Angular here, you’re not the only one 😅
I haven't even used Angular, I just get the concepts 😅
same here, react developer, but I still get the angular jokes
sadly no open-source library for that
;-;
You are right! BUUUUT!!!
Then stuff like this happen:
ZeroToHeroGuy79: “Wait a minute cowboy! You didn't do type verification on this one, better try this one:”
But then someone will tell you:
Brogrammer1024: hol'up brother!
typeof
is not that reliable, and you can not trust the user,NaN
values (Not a number) are considered numbers withtypeof
and that method will always returntrue
.DarkDenoBunVader4: “Yeah, the same will happen with Infinity and -Infinity”
Better try this one:
And it can go on on forever.
x % 2 !== 0
can be wrong. Sometimes,x
is not an integer, due to JavaScript's floating point bug.Those don't work either. :D