- for (var j = 1; j <= total_servers; j++) {
- (function (k) { // TODO: ES6 with let
- // For the virtual buffer
- setTimeout(function () {
- runServer(k, function (app, url) {
- anotherServerDone(k, app, url)
- })
- }, 1000 * k)
- })(j)
+ for (let j = 1; j <= total_servers; j++) {
+ // For the virtual buffer
+ setTimeout(function () {
+ runServer(j, function (app, url) {
+ anotherServerDone(j, app, url)
+ })
+ }, 1000 * j)