Function attribute_exists()

← Back to Module core



Module core → attribute_exists()

Description

Check whether the object obj has attribute attr or not

attribute_exists(obj, attr)


Parameters


Return Value


Usage Example

a = {
    x: 10,
    y: 20
}
 
attribute_exists(a, "x")   ' Returns true
attribute_exists(a, "z")   ' Returns false


Availability

This function is available on Dinfio version 3.1.06 or later