I can’t test it right now but I would love to know. Is it true?

macniel
link
fedilink
6
edit-2
4M

typeof x === "undefined" is true.

Then the bastard tries to willingly access x to equate it to undefined, but that can’t work since x is undefined and yields a ReferenceError (rendering the third expression moot).

The monks answers of document.all is not applicable since document.all is a live set of data which can be nothing or everything.

Who even introduced document.all? I bet it was microsoft…

@burrito82@feddit.de
link
fedilink
41
edit-2
4M

Seems to be so, see Exceptional behavior of document.all

Although document.all is also falsy and loosely equal to undefined, it is not undefined. The case of document.all having type “undefined” is classified in the web standards as a “willful violation” of the original ECMAScript standard for web compatibility.

No, it’s undefined

not strictly

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
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.47K Posts
  • 32.2K Comments
  • Modlog