@gornius@lemmy.world
link
fedilink
5
edit-2
1Y

The way I use it is ‘undefined’ is literally undefined (not set), but null means no value - explicitly.

@FiniteLooper@lemm.ee
link
fedilink
English
51Y

I used to ban null usages with ESLint rules for this exact reason. If it’s there use a value, if not use undefined

@chaorace@lemmy.sdf.org
link
fedilink
English
11Y

Except you can define a value with undefined and accessing that value will have different behavior than attempting to access an undefined value.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog