▲ 22 ▼ Brave will not add Web Integration support (twitter.com) submitted 3 years ago* (last edited 3 years ago) by mrmanager@lemmy.today to c/technology@lemmy.world 85 comments fedilink hide all child comments I think we need all support we can get to fight Google on this, so I welcome Brave here actually. Use this link to avoid going to Twitter: https://nitter.kavin.rocks/BrendanEich/status/1684561924191842304
[–] kameecoding@lemmy.world 1 point 3 years ago* (1 child) sure mate, just tell me the result of the following without trying it out. 0 && 1 && false permalink fedilink source parent hideshow 2 child comments replies: [–] EuphoricPenguin22@normalcity.life 0 points 3 years ago* (1 child) If I remember correctly, 0 and 1 are considered falsy and truthy respectively, so it should be falsy and truthy and false which I believe would return false. Tried it out to double-check, and the type of the first in the sequence is what ultimately is returned. It would still function the same way if you used it in a conditional, due to truthy/falsy values. permalink fedilink source parent hideshow 2 child comments replies: [–] kameecoding@lemmy.world 1 point 3 years ago* yes, that is a solid logic, one that I also applied and expected to be the result. that is until a Vue component started complaining that I am passing in a number for a prop that expects a boolean. turns out the result of that code is actually: 0, because javascript of course if you flip it and try false && 0 && 1 then you get false, because that's what you really want in a language, where && behaves differently depending on what is on what side. permalink fedilink source parent
[–] EuphoricPenguin22@normalcity.life 0 points 3 years ago* (1 child) If I remember correctly, 0 and 1 are considered falsy and truthy respectively, so it should be falsy and truthy and false which I believe would return false. Tried it out to double-check, and the type of the first in the sequence is what ultimately is returned. It would still function the same way if you used it in a conditional, due to truthy/falsy values. permalink fedilink source parent hideshow 2 child comments replies: [–] kameecoding@lemmy.world 1 point 3 years ago* yes, that is a solid logic, one that I also applied and expected to be the result. that is until a Vue component started complaining that I am passing in a number for a prop that expects a boolean. turns out the result of that code is actually: 0, because javascript of course if you flip it and try false && 0 && 1 then you get false, because that's what you really want in a language, where && behaves differently depending on what is on what side. permalink fedilink source parent
[–] kameecoding@lemmy.world 1 point 3 years ago* yes, that is a solid logic, one that I also applied and expected to be the result. that is until a Vue component started complaining that I am passing in a number for a prop that expects a boolean. turns out the result of that code is actually: 0, because javascript of course if you flip it and try false && 0 && 1 then you get false, because that's what you really want in a language, where && behaves differently depending on what is on what side. permalink fedilink source parent