0 votes
in JavaScript by
State the difference between Apply and Call?

1 Answer

0 votes
by
The call() method helps to call a function which has a given ‘this’ value and the arguments which are individually provided. The syntax is:

fun.call(thisArg[, arg1[, arg2[, …]]])

The apply() method is used to call a function which has a given ‘this’ value but the arguments are presented as an array. The syntax is:

fun.apply(thisArg, [argsArray])

Related questions

0 votes
asked Dec 11, 2023 in Cobol by rajeshsharma
0 votes
asked Jan 7 in Selenium by SakshiSharma
...