Lena@gregtech.eu to Programmer Humor@programming.dev · 2 days agoWhat the fuck javascriptgregtech.euimagemessage-square57fedilinkarrow-up1180
arrow-up1180imageWhat the fuck javascriptgregtech.euLena@gregtech.eu to Programmer Humor@programming.dev · 2 days agomessage-square57fedilink
minus-squaretreadful@lemmy.ziplinkfedilinkEnglisharrow-up9·2 days agoYou talk like error handling isn’t a thing.
minus-squareLupie@sopuli.xyzlinkfedilinkarrow-up1·8 hours agoI’m just saying a try-catch feels like a little much for handling mathematically valid user input.
minus-squareanewfox@lemmy.ziplinkfedilinkarrow-up11·edit-22 days agofun fact: getting NaN from a numeric calculation is the error that you handle. if this wasn’t obvious, please don’t write code for anyone but yourself. hope this helps.
minus-square🌞 Alexander Daychilde 🌞@lemmy.worldlinkfedilinkEnglisharrow-up10·2 days ago if this wasn’t obvious, If this wasn’t obvious, be glad of the chance to learn. If we all stopped as soon as something simple wasn’t obvious, nobody would learn and nobody would do anything. What a terrible reply to someone. It cuts off curiosity and says “You are too stupid to do anything.” Yet I bet there was a time that even with that very specific thing, you didn’t think of it that way.
minus-squarelemonsorrel@lemmy.worldlinkfedilinkarrow-up2·2 days agonewcomers to shitting on javascript sometimes learn to blame the tool
minus-squaretreadful@lemmy.ziplinkfedilinkEnglisharrow-up1·2 days agoNaN is a primitive value, not an Error. >> typeof 1 / "a" "number"
You talk like error handling isn’t a thing.
I’m just saying a try-catch feels like a little much for handling mathematically valid user input.
fun fact: getting NaN from a numeric calculation is the error that you handle. if this wasn’t obvious, please don’t write code for anyone but yourself. hope this helps.
If this wasn’t obvious, be glad of the chance to learn.
If we all stopped as soon as something simple wasn’t obvious, nobody would learn and nobody would do anything.
What a terrible reply to someone. It cuts off curiosity and says “You are too stupid to do anything.”
Yet I bet there was a time that even with that very specific thing, you didn’t think of it that way.
newcomers to shitting on javascript sometimes learn to blame the tool
NaNis a primitive value, not anError.>> typeof 1 / "a" "number"