JavaScript handler.apply() MethodThe handler.apply() method is used to trap for a function call. The value returned by the apply trap is also going to be used as the result of a function call through a proxy. SyntaxParameterstarget: The target object. thisArg: thisArg use for the call. argumentsList: The list of arguments used for the call. Return valueThis method can return any value. Browser Support
Example 1Test it NowOutput: First exam.. proxy value(23, 54) Example 2Test it NowOutput: in apply in x(direct1, direct2) in apply in x(add, add) in apply in x(string, string) Example 3Test it NowOutput: 56 68 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