The choice between 'call' and 'apply' in JavaScript depends on whether you have the arguments as an array or as individual parameters.
Use 'call' when you have the arguments as individual parameters.
Us...read more
Difference between the call() and apply() methods: The only difference is call() method takes the arguments separated by a comma while apply() method takes the array of arguments. Example 1: This exam...read more
call() passes all arguments after the first one on to the invoked function, while apply() takes an array as its second argument and passes the members of that array as arguments
Call() mathod takes the argument separated by a comma while
Apply() mathod takes tha array of arguments.
The call() method takes arguments separately. The apply() method takes arguments as an array. The apply() method is very handy if you want to use an array instead of an argument list.
call() passes all arguments after the first one on to the invoked function, while apply() takes an array as its second argument and passes the members of that array as arguments.
The difference is: The call() method takes arguments separately. The apply() method takes arguments as an array. The apply() method is very handy if you want to use an array instead of an argument lis...read more
The difference is: The call() method takes arguments separately. The apply() method takes arguments as an array. The apply() method is very handy if you want to use an array instead of an argument lis...read more
Top Cognizant Associate interview questions & answers
Popular interview questions of Associate
Top HR questions asked in Cognizant Associate
Reviews
Interviews
Salaries
Users/Month