What is the concept of “functions as objects” and how does this affect variable scope?
Answer / Avinash Rai
In JavaScript, functions are objects. This means that they can be created, assigned to variables, passed as arguments to other functions, and returned from other functions. Regarding variable scope, when a function is declared within another function, it has access to the outer function's variables unless they are explicitly re-declared with 'var', 'let', or 'const' in the inner function.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is whitespace in javascript?
Some XYZ company is arranging for online aptitude tests. Draw detailed E-R diagram for the same..
How do I open javascript in browser?
Is there any ide for javascript?
What is an anonymous function in JavaScript?
java is pure object oriented or not?
How to remove duplicates from javascript array?
What is the difference between registerclientscriptblock and registerstartupscript?
What is the role of a strict mode in javascript?
How can I prevent others from reading/stealing my scripts or images?
What is object cloning
Is python better than javascript?