Skip to content

Instantly share code, notes, and snippets.

@arrbxr
Created August 13, 2018 20:41
Show Gist options
  • Save arrbxr/76b5fb6ea668abca0549e14c97e032e4 to your computer and use it in GitHub Desktop.
Save arrbxr/76b5fb6ea668abca0549e14c97e032e4 to your computer and use it in GitHub Desktop.
Functional Programming in javaScript created by arrbxr - https://repl.it/@arrbxr/Functional-Programming-in-javaScript
const prepareTea = () => "greenTea";
const getTea = (numOfCups) =>{
const teaCups = [];
for(let cups = 1; cups < numOfCups; cups++){
const teaCup = prepareTea();
teaCups.push(teaCup);
}
return teaCups;
};
const tea4TeamFCC = getTea(40);
console.log(tea4TeamFCC);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment