Logos DX
    Preparing search index...

    Function isUndefined

    • Checks if value is specifically undefined.

      Strict equality check for undefined values. More explicit than checking truthiness.

      Parameters

      • val: unknown

        value to check

      Returns val is undefined

      true if value is exactly undefined

      isUndefined(undefined) // true
      isUndefined(null) // false
      isUndefined('') // false
      isUndefined(0) // false

      let x;
      isUndefined(x) // true