JS Built-ins
Reflectapplybeginner

Reflect.apply() - arrow function add

πŸ“– Usage Example
const result = Reflect.apply(Math.max, null, [1, 5, 3])
console.log(result) // β†’ 5
// Equivalent to: Math.max.apply(null, [1, 5, 3])

Reflect.apply() calls a function with a given this value and arguments array, similar to Function.prototype.apply.

Reflect.apply works with arrow functions.

πŸ’‘ Hints (1)
  • β€’ Reflect.apply can call any function, including arrow functions.