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 , (edited )
@joneskind@lemmy.world avatar

In the case of a non-existing property, the value would be undefined rather than null.

And while == and != exist in JavaScript, most linters will throw an error and require a === and !== instead as they should be avoided.


<span style="color:#323232;">null == undefined // true
</span><span style="color:#323232;">null === undefined // false
</span>

Besides, null is a perfectly valid value for a property, just as 0. Working with API Platform, I couldn’t tell the number of times I used this kind of statement:


<span style="color:#323232;">if (property || property === null) {
</span><span style="color:#323232;">  // do some stuff
</span><span style="color:#323232;">}
</span>

Probably just as much as


<span style="color:#323232;">if (property || property === 0) {
</span><span style="color:#323232;">  // do some stuff
</span><span style="color:#323232;">}
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines