Can you assign an anonymous function to a variable and pass it as an argument to another function?
Answer / Shanky Bhatnagar
Yes, you can. In JavaScript, this is called a first-class function citizen because functions can be assigned to variables, passed as arguments to other functions, returned by other functions, and more.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to make a array as a stack using javascript?
How many types of functions are there in javascript?
Is javascript used for backend?
How do you target a specific frame from a hyperlink in javascript?
What is an asynchronous programming? Why is it important in javascript?
What are exports and imports?
Is null === undefined?
What are the four basic data structures in javascript?
Explain few difference between null, undefined or undeclared javascript variable?
How use javascript html?
How do you know if a set of points is a function?
What is the most widely used programming language?