Javatpoint Logo
Javatpoint Logo

JavaScript handler.has() Method

The handler.has() method used to "hide" any property you want. It's a trap for an operator. It returns the Boolean value true if you want the property to be accessed, otherwise false If the key is present or not in the original object.



target: The target object.

prop: The property to check for existence.

Return value

Return a Boolean value.

Browser Support

Chrome 49
Edge 12
Firefox 18
Opera 36

Example 1

Test it Now


in has true

Example 2

Test it Now


a in d: false
b in d: true

Example 3

Test it Now


called: a false

Next TopicJavaScript handler

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA