Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example 1 (Chrome profiler)
function makeClosure () {
var str = "This string was closed over";
return function () {
var myClosure = makeClosure();
myClosure(); // prints "This string was closed over"
<title>Example #1</title>
<h1>Example #1</h1>
Open up the Chrome profiler and follow the steps in the post.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment