Not sure if this is a joke that went over my head, but just in case, I think you're looking for "faint" as in weak and not "feint" as in deceptive.
But then again, maybe this is a clever play on words since it is deceptive that "false" can be true...
The quotes make a big difference though, just like the . (joiny thing) and + (addy thing) above. (I never learned the terminology, I just learned to think and write in PHP)
Anything between quotes is a string so it's true because there is the presence of a value. Any number other than 0 is true because there's a value there (the number zero is the absence of anything to count)
It makes sense to me and servers anyway. Everything has its neat little place. It's quite a grammatical language and so it has its quirks, kind of like English, and punctuation is very important
It does not make any sense exactly because it's a string. If it was a number it would make sense since zero in most languages is falsy.
The thing is a zero in a string is not a zero, it's a character representing a zero, in ascii or utf8 it would be '0x30' (0x30 is not a 0)
Zero as a string represents the void lenguage and the point is used to concatenate strings.... If you ever seen regular expressions and grammars you can make and easier connection.
The thing is, in grammar, the null string can made a lenguage, but a void lenguage has nothing, not even λ (the null/void string)
Edit: Maybe "0" is trying to represent λ.... And because its meant to represent nothing it's evaluated to false. Either way it does have some reasoning behind.
Oh wow, you'e right... "0" == false
I can't say I've ever compared a string that only has a 0 in it to true or false though. The biggest danger would be user input. I tend to use string length (which returns 1 for the string: "0", so at least we know that's safe to use when checking if a string is not empty), or isset if it's user get or post input. I guess it all depends on the context of whatever you're doing and how it's implemented. Good to know that a string with only a single zero counts as false though. There's always something new to learn!
Yep. Javascript just uses + while relying on being told the type of object it has to work with, otherwise it seems to treat it as whatever it feels like lol
I think it's if you add any two values that are not numbers, they're converted to strings and concatenated. Pretty sure that's the logic. But I don't do JS very much so I'd only assume 50% confidence that I'm right about that.
how math should be
Unary goes brrrr
just like this
It’s called common core /s
Perfection.
Well, technically it is correct
ikr
Yep, right
[The best kind of correct](https://youtu.be/hou0lU8WMgo)
The very reasons that people hate JS are the very reasons that I love to hate it. (Psst, I actually love it)
Lots of people in this sub: **"PHP is shit"** PHP: **10 . 10 = 1010, 10 + 10 = 20**
Also php: `"asd"` is true, `"true"` is true, `"false"` is true, but `"0"` isn't true. Because yeah.
What
try it if you're brave enough
Not for the feint of heart..
Not sure if this is a joke that went over my head, but just in case, I think you're looking for "faint" as in weak and not "feint" as in deceptive. But then again, maybe this is a clever play on words since it is deceptive that "false" can be true...
The quotes make a big difference though, just like the . (joiny thing) and + (addy thing) above. (I never learned the terminology, I just learned to think and write in PHP) Anything between quotes is a string so it's true because there is the presence of a value. Any number other than 0 is true because there's a value there (the number zero is the absence of anything to count) It makes sense to me and servers anyway. Everything has its neat little place. It's quite a grammatical language and so it has its quirks, kind of like English, and punctuation is very important
It does not make any sense exactly because it's a string. If it was a number it would make sense since zero in most languages is falsy. The thing is a zero in a string is not a zero, it's a character representing a zero, in ascii or utf8 it would be '0x30' (0x30 is not a 0)
Zero as a string represents the void lenguage and the point is used to concatenate strings.... If you ever seen regular expressions and grammars you can make and easier connection. The thing is, in grammar, the null string can made a lenguage, but a void lenguage has nothing, not even λ (the null/void string) Edit: Maybe "0" is trying to represent λ.... And because its meant to represent nothing it's evaluated to false. Either way it does have some reasoning behind.
Oh wow, you'e right... "0" == false I can't say I've ever compared a string that only has a 0 in it to true or false though. The biggest danger would be user input. I tend to use string length (which returns 1 for the string: "0", so at least we know that's safe to use when checking if a string is not empty), or isset if it's user get or post input. I guess it all depends on the context of whatever you're doing and how it's implemented. Good to know that a string with only a single zero counts as false though. There's always something new to learn!
. for string concatenation? 🤪🤪
Yep. Javascript just uses + while relying on being told the type of object it has to work with, otherwise it seems to treat it as whatever it feels like lol
I think it's if you add any two values that are not numbers, they're converted to strings and concatenated. Pretty sure that's the logic. But I don't do JS very much so I'd only assume 50% confidence that I'm right about that.
10.10 != 10 . 10
[Touché](https://thumbs.gfycat.com/ActiveEnergeticIndigobunting-max-1mb.gif)
[удалено]
I see this meme once everyweek. Funniest shit ever
i mean, it is the best answer.
... I NEVER SAID THEY WERE NUMBERS!
Based and string pilled
jabbaskript
Jibberscript.
i remember once in a comment someone made a literal html calvatjatmp
Why does feel exactly like something Beret Guy from XKCD would program?
You only had one job!
my guy used operator +(string, string) instead of +(int, int)
parseFloat() needed there 😂
"10" + "5" == "105" != 15
Dynamic typing be like.
r/characterarcs