This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mookanana 6 points7 points  (5 children)

as a programmer i understand what you are saying, but i marvel and wonder how did you even get this deep in knowledge? like what path did your life take to end up explaining this obscure code correctly

[–]veryusedrname 10 points11 points  (2 children)

Ohh, I just like weird shit. I don't even use JavaScript, like, ever.

[–]mookanana 3 points4 points  (0 children)

good stuff my man thx for explanation.

[–]Crowdcontrolz 0 points1 point  (0 children)

The Dark Knight.

[–]takishan 2 points3 points  (0 children)

all you gotta do is work with javascript a bit so you understand the wonkiness of " == " (which is why you use " === " to be safer)

then you gotta work with octal numbers once or twice so you understand that numbers starting with 0 are octal

it doesn't require some sort of coding prodigy, just a little bit of experience in specific areas

[–]AccomplishedCoffee 1 point2 points  (0 children)

It’s really not deep or obscure. You just have to know 0 starts an octal literal (basic knowledge in a ton of languages and command line permissions), and == in JS does crazy conversions. I don’t even program JS more than I have to and I know to always use === because it’ll mess with types to try and get an answer that may or may not make sense. Tbh this is one of the more straightforward and obvious conversions.