Skip to content

Instantly share code, notes, and snippets.

@toddzebert
Created March 27, 2017 04:06
Show Gist options
  • Save toddzebert/ec087188b813e6490abab2cf0feb2ad5 to your computer and use it in GitHub Desktop.
Save toddzebert/ec087188b813e6490abab2cf0feb2ad5 to your computer and use it in GitHub Desktop.
getAd code for use with simAsync.js
// requires https://gist.github.com/toddzebert/996e297c1c081d19378eaf5f29dc75bb
var getAd = (function (dat) {
let i = 1;
// create a closure
const ad = function () {
return 'Ad#' + i++;
};
return function (dat) {
return simAsync(ad);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment