JavaScript Function apply() methodLast Updated : 17 Mar 2025 The JavaScript Function apply() method is used to call a function contains this value and an argument contains elements of an array. Unlike call() method, it contains the single array of arguments. SyntaxParameterthisArg - It is optional. The this value is given for the call to a function. array - It is optional. It is an array-like object. Return ValueIt returns the result of the calling function along provided this value and arguments. JavaScript Function apply() method ExampleExample 1Let's see an example to determine the maximum element. Output: 9 Example 2Let's see an example to determine the minimum element. Output: 1 Example 3Let's see an example to join arrays of same type. Output: 1,2,3,4,5,6,7,8 Example 4Let's see an example to join array of different type. Output: 1,2,3,4,One,Two,Three,Four Next TopicJavaScript Function bind() method |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India