Determines if a thing has a given property.
This function does not generate a change.
thing.has(name)
| Argument | Type | Description |
|---|---|---|
| name | str (required) | Name of the property to check. |
Returns true when the given property name is found and otherwise false.
This code shows an example use case of has():
tmp = {name: 'Iris'};
/* Check if `tmp` has a property `name` */
tmp.has('name');
Return value in JSON format
true