Answers for "javascript create function closure"

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

Code answers related to "javascript create function closure"

Code answers related to "Javascript"

Browse Popular Code Answers by Language