Forum Discussion
rraghvani
2 years agoChampion Level 3
Hopefully, I understand what you mean now. Try this,
function CheckProperty()
{
const Name = {
Firstname: "SmartBear"
}
Log.Message(Name.Firstname);
Log.Message(Name.hasOwnProperty("Firstname")); // true
Log.Message(Name.hasOwnProperty("Surname")); // false
}
Use "hasOwnProperty()"
Related Content
- 9 years ago
- 9 years ago
- 10 years ago
Recent Discussions
- 21 hours ago
- 21 hours ago
- 5 days ago