JavaScript has() method

The Javascript handler has() method hides the specified property. Syntax: has: function(target, property) Parameters: target: It represents the target object. property: It represents the property to be hidden. Return: Boolean. Example: <!DOCTYPE html> <html> <body> <script> var handler={x:10} var display = new Proxy(handler, { has: function(a,b) { document.writeln(b); return false; } }); document.writeln(‘Value:’ in display); … Read more