undefined. These so called empty values (or bottom values) are themselves values but carry no information.
While the primitive types
undefined are often interchangeable, the prevailing consensus is to use
undefined in most cases. This leads to more consistent code and also means you don't have to check whether a condition satisfies both of them.
"...it’s safest and best to use only undefined as the single empty value, even though null seems attractive in that it’s shorter to type!"- Kyle Simpson, *You Don't Know JS Yet*
There are, of course, exceptions (in JSON or to create a new empty object with
Object.create(null)) but that probably means you know what you are doing.
So, in summary, use
undefined most times. Use
null only when you have reasons not to use