VOOZH about

URL: https://www.geeksforgeeks.org/javascript/javascript-apply-function/

⇱ JavaScript Apply() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

JavaScript Apply() Function

Last Updated : 11 Jun, 2026

The apply() method is used to write methods, which can be used on different objects. It is different from the function call() because it takes arguments as an array. 

Syntax:

apply()

Return Value: It returns the method values of a given function. 

Example 1: This example illustrates the apply() function without arguments. 


Example 2: This example illustrates the apply() function with arguments. 

Comment
Article Tags: