Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

closure

function makeFunction() {
  const name = 'TK';
  function displayName() {
    console.log(name);
  }
  return displayName;
};
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #closure
ADD COMMENT
Topic
Name
6+9 =