Understand Functional Programming Terminology (need help solving what i did wrong)

Tell us what’s happening:

   **Your code so far**

* A long process to prepare tea.
* @return {string} A cup of tea.
const prepareTea = () => 'greenTea'; 

* Get given number of cups of tea.
* @param {number} numOfCups Number of required cups of tea.
* @return {Array<string>} Given amount of tea cups. 
const getTea = (numOfCups) => {
 const teaCups = [];

 for(let cups = 1; cups <= numOfCups; cups += 1) {
   const teaCup = prepareTea();

 return teaCups;

// Add your code below this line

const tea4TeamFCC = getTea(40); // :(

// Add your code above this line

   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36.

Challenge: Understand Functional Programming Terminology

Link to the challenge:

where have you prepared the two different groups of tea?

Prepare 27 cups of green tea and 13 cups of black tea and store them in tea4GreenTeamFCC and tea4BlackTeamFCC variables, respectively. Note that the getTea function has been modified so it now takes a function as the first argument.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.