In our applications it is often useful to be able to represent the possible absence of a value. In JavaScript we have undefined to represent the result of trying to access something that was never defined to begin with, and we havenull to assign to values that might have a value but could also be empty. These two are often conflated and used interchangeably both at the core language level and in libraries, but both are used to communicate the lack of a value where it is possible to find one.

For example, consider the function Array.prototype.find