JavaScript handler.has() MethodThe 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. SyntaxParameterstarget: The target object. prop: The property to check for existence. Return valueReturn a Boolean value. Browser Support
Example 1Test it NowOutput: in has true Example 2Test it NowOutput: a in d: false b in d: true Example 3Test it NowOutput: called: a false Next TopicJavaScript handler |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India