Skip to content

Instantly share code, notes, and snippets.

@kermit-klein
Created July 21, 2020 10:24
Show Gist options
  • Save kermit-klein/bf8790d2d79b5395a8b25f381928503d to your computer and use it in GitHub Desktop.
Save kermit-klein/bf8790d2d79b5395a8b25f381928503d to your computer and use it in GitHub Desktop.
closure_example_3
const counter = () => {
let count = 0;
return () => {
return (count = count + 1);
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment