Jeena ( jeena@jemmy.jeena.net ) to Programmer Humor@programming.dev · 2 years agoNot a Numberjemmy.jeena.netimagemessage-square19linkfedilinkarrow-up1222file-text
arrow-up1222imageNot a Numberjemmy.jeena.netJeena ( jeena@jemmy.jeena.net ) to Programmer Humor@programming.dev · 2 years agomessage-square19linkfedilinkfile-text
minus-squarenickwitha_k (he/him) ( nickwitha_k@lemmy.sdf.org ) linkfedilinkarrow-up17·2 years ago0*(NaN)… So does that mean the price IS a number?
minus-squareRecluseRamble ( RecluseRamble@lemmy.dbzer0.com ) linkfedilinkarrow-up8·2 years agoI suppressed most of my former js knowledge but I guess it’s a string now.
minus-squaretiredofsametab ( tiredofsametab@kbin.run ) linkfedilinkarrow-up6·2 years agoIn JS, it’s just NaN if my browser’s console is to be believed. I suspected it would probably be {object} for no clear reason
minus-squarenickwitha_k (he/him) ( nickwitha_k@lemmy.sdf.org ) linkfedilinkarrow-up6·2 years ago for no clear reason JS That’s the reason. The language has an awful type system.
minus-squareTheOakTree ( TheOakTree@beehaw.org ) linkfedilinkarrow-up4·2 years agoIf 0/0 is NaN, then does that mean 0*NaN = 0*0/0 = 0?
0*(NaN)… So does that mean the price IS a number?
I suppressed most of my former js knowledge but I guess it’s a string now.
In JS, it’s just NaN if my browser’s console is to be believed. I suspected it would probably be
{object}for no clear reasonIf 0/0 is NaN, then does that mean 0*NaN = 0*0/0 = 0?
0*NaN = NaN