Skip to content

Instantly share code, notes, and snippets.

@austbot
Created February 17, 2018 22:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save austbot/14c26903a7942f0f192859b02ab6a1f2 to your computer and use it in GitHub Desktop.
function what(a, b) {
const c = a + b;
return (c / a) % b;
}
function whatRunner(numberOfTimes, multiplier) {
const runs = [];
for(let i = 1; i <= numberOfTimes; i++) {
runs.push(what(i, multiplier * i));
}
return runs;
}
console.log(whatRunner(100, 5));
console.log(whatRunner(100, 7));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment