Answers for "closure meaning in javascript"

1

what is closure in javascript

function OuterFunction() {

    var outerVariable = 100;

    function InnerFunction() {
        alert(outerVariable);
    }

    return InnerFunction;
}
var innerFunc = OuterFunction();
Posted by: Guest on May-25-2021
4

closure in javascript

function makeFunc() {
  var name = 'Mozilla';
  function displayName() {
    alert(name);
  }
  return displayName;
}

var myFunc = makeFunc();
myFunc();
Posted by: Guest on July-04-2020
-1

closure in javascript

What is the closure in JavaScript?
ans:The Closure is a function with some remember values
Posted by: Guest on July-02-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language