I use JS (via Typescript) almost daily if not several times a day and ngl if I see a codebase with these kinda things in it "to look smart", I'm running. Merry Christmas
@DuncanBooth11 сағат бұрын
Oh, and Python does have nans builtin, just `from math import nan` or even `float("nan")`
@Carberra10 сағат бұрын
Oh cool, knew about float("inf") but not float("nan")!
@davidmurphy56310 сағат бұрын
Non-zero div zero is not infinity, it's DNE does not exist. The way to confirm this is to rearrange it as the equivalent multiplication. Let's do it with an example of 3 and see what happens. *Something over zero:* 1 / 0 = 3 or equivalently: 3 * 0 = 1 This is False. It's definitely not infinity. We can change the 3 for any number - no number resolves to True. It's always a False statement. *Zero over zero:* 0 / 0 = 3 or equivalently: 3 * 0 = 0 This is True! So is it defined? Nope. Let's change the 3 to a 4. `4 * 0 = 0` that's also True. So every value is True. Well, if every value is True then no value is True. If not, we could safely conclude that 4 = 3 and that breaks the Law of Non-Contradiction. ps. Merry Christmas! pps. js is terrible!
@DuncanBooth11 сағат бұрын
I got 15 out of 25. I correctly guessed empty arrays were truthy but wrongly thought empty strings might be as well. As for question number 8 though, I think I need to sit down quietly in a dark room somewhere to recover.
@Carberra10 сағат бұрын
Over half, GG! Yeah question 8 is definitely the most cursed one I think. That logic is something else.
@Dexter101x2 сағат бұрын
I was going to give advice about that cold you have and claiming its a "winter" problem, but I don't think you'll understand me, lol
@dipeshsamrawat795710 сағат бұрын
So, are you going to bring JavaScript series here??😍
@Carberra10 сағат бұрын
I might do some videos on it but I've been undecided for a while. We'll see I guess haha.
@dipeshsamrawat795710 сағат бұрын
@Carberra We are waiting eagerly. Thank you 😊
@Dexter101x2 сағат бұрын
And yes, JS is weird, but so is python in a way. But try doing VBA, even weirder