Q. What is a Closure in javascript? Q. console.log("a" + 20 +20); console.log(20+20+"a"); Q. Where are JS variables stored - Heap/Stack - where? Q. What is $ in jQuery? Q. How do you differentiate between Angular's $ & jQuery's $. Q. How can you implement multithreading in javascript? How can I execute multiple functions in javascript? Q. On click of a button, API is hit and html is rendered from Server. This HTML contains a button. I want to add an event saying alert[1); on this button. How can I do it? Given, the element id of the button to you in the callback. I don't want multiple alerts to fire.
Anónimo
I told that Closure is a nested function that has access to 3 scopes: 1. global scope, 2. its own local scope, 3. scope which is just above it i.e. the scope of the function inside which the inner function is present. He looked satisfied.