Javatpoint Logo
Javatpoint Logo

JavaScript Reflect.apply() Method

The static Reflect.apply() method of JavaScript is used to call a function using the specified argument.

Syntax

Parameter

target: It is the target function to call.

thisArgument: It is the value of this provided for the call to target.

ArgumentsList: It is an array-like object specifying the argument with which target should be called.

Return

The result of calling the given target function with the specified this value and arguments.

Exceptions

This method will throw a TypeError if the target is not callable.

Example 1

Output:

Object { x: 33, y: 44 }

Example 2

Output:

"hello"
   55

Example 3

Output:

    45
   "hegi"
    4
   "u"

Next TopicJavaScript Reflect




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA