JSFiddle - React, Tailwind, and code Playground
by kianoshp
HTML
<script src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script>
JavaScript
//Closure problem
var funcs = {};
for (var i = 0; i < 3; i++) { // let's create 3 functions
funcs[i] = function() { // and store them in funcs
console.log("My value: " + i); // each should log its value.
};
};
for (var j = 0; j < 3; j++) {
funcs[j](); // and now let's run each one to see
};
firebug.env.height = 200;
firebug.env.debug= true;
firebug.env.detectFirebug = true;