No, it's just a pretty lame joke that got repeated like five million times.
Unfortunately our community breeds an extremely self-referential, repetitive humour that can get quite annoying. Like that one guy pissing his pants laughing because 42 hahahaha.
parseInt is meant for strings so it converts the number there into a string. Once the numbers get small enough it starts representing it with scientific notation. So 0.0000001 converts into “1e-7” where it then starts to ignore the e-7 part because that’s not a valid int, so it is left with 1
Ok some of these I understand but what the fuck. Why.
Edit: ok I have a theory. == checks equality without casting to any types, so they’re not equal. But < and > are numeric operations, so null gets cast to 0. So <= and >= cast it to 0, and it’s equal to 0, so it’s true.
greater than, smaller than, will cast the type so it will be 0>0 which is false, ofcourse. 0>=0 is true.
Now == will first compare types, they are different types so it’s false.
Also I’m a JavaScript Dev and if I ever see someone I work with use these kind of hacks I’m never working together with them again unless they apologize a lot and wash their dirty typing hands with… acid? :-)
edit: as several people already pointed out, my answer is not accurate. The real solution was mentioned by mycus
This was originally an engineers’ complaint about managers’ honesty regarding business trouble: Managers think we’re mushrooms; they keep us in the dark and feed us bullshit.
During the cold war, the anticommunist ideological framework could transform any data about existing communist societies into hostile evidence. If the Soviets refused to negotiate a point, they were intransigent and belligerent; if they appeared willing to make concessions, this was but a skillful ploy to put us off our guard. By opposing arms limitations, they would have demonstrated their aggressive intent; but when in fact they supported most armament treaties, it was because they were mendacious and manipulative. If the churches in the USSR were empty, this demonstrated that religion was suppressed; but if the churches were full, this meant the people were rejecting the regime’s atheistic ideology. If the workers went on strike (as happened on infrequent occasions), this was evidence of their alienation from the collectivist system; if they didn’t go on strike, this was because they were intimidated and lacked freedom. A scarcity of consumer goods demonstrated the failure of the economic system; an improvement in consumer supplies meant only that the leaders were attempting to placate a restive population and so maintain a firmer hold over them. If communists in the United States played an important role struggling for the rights of workers, the poor, African-Americans, women, and others, this was only their guileful way of gathering support among disfranchised groups and gaining power for themselves. How one gained power by fighting for the rights of powerless groups was never explained. What we are dealing with is a nonfalsifiable orthodoxy, so assiduously marketed by the ruling interests that it affected people across the entire political spectrum.
lemmy.ml
Top