{"size": 630, "ext": "js", "max_stars_repo_path": "7-assets/_SNIPPETS/0-working-snippets/Array/string-helpers/stringUtil1/Very-Incomplete/private-State/dynamicCB.js", "max_stars_repo_name": "eengineergz/Lambda", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "7-assets/_SNIPPETS/0-working-snippets/Array/string-helpers/stringUtil1/Very-Incomplete/private-State/dynamicCB.js", "max_issues_repo_name": "eengineergz/Lambda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "7-assets/_SNIPPETS/0-working-snippets/Array/string-helpers/stringUtil1/Very-Incomplete/private-State/dynamicCB.js", "max_forks_repo_name": "eengineergz/Lambda", "max_forks_repo_forks_event_min_datetime": "2021-11-05T07:48:26.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-05T07:48:26.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 22.5, "max_line_length": 68, "alphanum_fraction": 0.5952380952}
// const readline = require("readline");
// const rl = readline.createInterface({
//   input: process.stdin,
//   output: process.stdout,
// });
// rl.question("What do you think of Node.js? ", (answer) => {
//   // TODO: Log the answer in a database
//   console.log(`Thank you for your valuable feedback: ${answer}`);
//
//   rl.close();
// });

let array = [...objArr]; // An array with some objects

function cbClose(i, callback) {
  return function () {
    return callback(i);
  };
}

for (let i = 0; i < array.length; ++i) {
  readline.dynamicCbs(
    cbClose(i, function (i) {
      array[i].something = 42;
    })
  );
}
