Docs

Namaste JavaScript — Interview Quick Notes

Ep 6: undefined vs not defined


  • undefined — memory was allocated but no value assigned yet. JS uses it as a placeholder.
  • not defined — variable was never declared; accessing it throws ReferenceError.
  • JS is loosely typed — a variable can hold any type at any time.
  • Never manually assign undefined to a variable; let JS set it.