There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

joneskind ,
@joneskind@lemmy.world avatar

in javascript a property is truthy if it exists


<span style="color:#323232;">myThing.property = "some string"
</span><span style="color:#323232;">
</span><span style="color:#323232;">if (myThing.property) { // true
</span><span style="color:#323232;">  // do something
</span><span style="color:#323232;">}
</span>

It works with everything except of course for falsy values


<span style="color:#323232;">myThing.number = someNumberThatShouldNotBeEqualToZero
</span><span style="color:#323232;">
</span><span style="color:#323232;">if (myThing.number) {
</span><span style="color:#323232;">  // do something very important with that number that should not be equal to zero
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">// This can fail at anytime without warning
</span>

So you’ve got to be extra careful with that logic when you’re dealing with numbers.

I am not saying it’s wrong though. I’m saying it’s often annoying.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines