JSFiddle - React, Tailwind, and code Playground

by uchihazephyr

JavaScript

var pages = ["a", "b", "c"];


for (var key in pages) {
    console.log('before: ' + key);
    (function (thisKey) {
        setTimeout(function () {
            console.log('after: ' + thisKey);
        }, 1000);
    })(key);
}