Function hasOwn

  • Checks if the given object has its own property.

    Parameters

    • obj: object

      The object to check.

    • prop: PropertyKey

      The property to check.

    Returns boolean

    Returns true if the object has its own property, otherwise false.