has

fun has(target: Any, propertyKey: PropertyKey): Boolean(source)

Equivalent to propertyKey in target.

Parameters

target

Object that contains the property on itself or in its prototype chain.

propertyKey

Name of the property.