JavaScript Function apply()

The JavaScript Function apply() method calls a function containing this value and a single array of arguments. Syntax: function.apply(thisArg, array) Parameters: thisArg: It is used as this keyword for the call to a function. It is an optional parameter. array: It represents an array-like object. Return: Result of the invoking function. Example: <!DOCTYPE html> <html> … Read more