Tell us what’s happening:
They ask me to call the getTea
function
which i did
then asked to add 40 tea cups to it which i did
and then store it in the tea4TeamFCC
which i once again did
but test doesn’t pass why not?
what did i miss here
Your code so far
// Function that returns a string representing a cup of green tea
const prepareTea = () => 'greenTea';
/*
Given a function (representing the tea type) and number of cups needed, the
following function returns an array of strings (each representing a cup of
a specific type of tea).
*/
const getTea = (numOfCups) => {
const teaCups = [];
for(let cups = 1; cups <= numOfCups; cups += 1) {
const teaCup = prepareTea();
teaCups.push(teaCup);
}
return teaCups;
};
// Only change code below this line
prepareTea = getTea(40) ;
const tea4TeamFCC = null;
// Only change 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/84.0.4147.125 Safari/537.36
.
Challenge: Learn About Functional Programming
Link to the challenge: