# Learn About Functional Programming Error

**URL:** <https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [October 12, 2019, 8:27pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357 "2019-10-12T20:27:55Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchen](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jchen](https://forum.freecodecamp.org/u/jchen)\
**Post date:** [October 12, 2019, 8:27pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/1 "2019-10-12T20:27:55Z")

</div>

**Tell us what’s happening:**  
Keep getting Error: Request Error: 0

Not sure what I’m doing wrong.

**Your code so far**

```js

/**
 * 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();
    teaCups.push(teaCup);
  }

  return teaCups;
};

// Add your code below this line

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

// Add your code above this line

console.log(tea4TeamFCC);

```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36`.

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![daspinola](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/daspinola/32/123787_2.png) [@daspinola](https://forum.freecodecamp.org/u/daspinola)\
**Post date:** [October 12, 2019, 8:38pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/2 "2019-10-12T20:38:14Z")

</div>

Your code runs fine. When are you getting the error?

---

<div class="post-metadata">

**Author:** ![jchen](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jchen](https://forum.freecodecamp.org/u/jchen)\
**Post date:** [October 12, 2019, 8:51pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/3 "2019-10-12T20:51:32Z")

</div>

When I run the code it gives me the error. Even in firefox. Not sure if maybe its my new OS? Even in the next lesson I get the same error.

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [October 14, 2019, 3:00pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/4 "2019-10-14T15:00:28Z")

</div>

Is this still happening? I wonder if there was some trouble connecting to the freeCodeCamp servers.

---

<div class="post-metadata">

**Author:** ![jchen](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jchen](https://forum.freecodecamp.org/u/jchen)\
**Post date:** [October 14, 2019, 7:20pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/5 "2019-10-14T19:20:53Z")

</div>

Yes. I’m still getting the Error. It works on my phone but not my macbook.

---

<div class="post-metadata">

**Author:** ![pmw57](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pmw57/32/108070_2.png) [@pmw57](https://forum.freecodecamp.org/u/pmw57)\
**Post date:** [October 14, 2019, 10:19pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/6 "2019-10-14T22:19:26Z")

</div>

What does the developer console on your macbook show is the problem when it doesn’t run?

---

<div class="post-metadata">

**Author:** ![jchen](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jchen](https://forum.freecodecamp.org/u/jchen)\
**Post date:** [October 14, 2019, 10:31pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/7 "2019-10-14T22:31:03Z")

</div>

Error: Request Error: 0

---

<div class="post-metadata">

**Author:** ![pmw57](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pmw57/32/108070_2.png) [@pmw57](https://forum.freecodecamp.org/u/pmw57)\
**Post date:** [October 14, 2019, 10:36pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/8 "2019-10-14T22:36:26Z")

</div>

Are you using Safari on your macbook?  
Does Safari have any updates?  
What results do you have from a different browser such as Firefox?

---

<div class="post-metadata">

**Author:** ![pmw57](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pmw57/32/108070_2.png) [@pmw57](https://forum.freecodecamp.org/u/pmw57)\
**Post date:** [October 14, 2019, 10:47pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/9 "2019-10-14T22:47:11Z")

</div>

Safari and Firefox have different developer consoles. From either of them you should be able to find a network tab, which should be able to reveal what is giving the request error.

---

<div class="post-metadata">

**Author:** ![jchen](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jchen](https://forum.freecodecamp.org/u/jchen)\
**Post date:** [October 14, 2019, 10:49pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/10 "2019-10-14T22:49:17Z")

</div>

I’m using chrome. No updates that I know of. It was working fine before I started the functional programming section.

---

<div class="post-metadata">

**Author:** ![pmw57](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pmw57/32/108070_2.png) [@pmw57](https://forum.freecodecamp.org/u/pmw57)\
**Post date:** [October 14, 2019, 10:55pm UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/11 "2019-10-14T22:55:05Z")

</div>

Could it be some extensions that are causing the issue?

Run Chrome with the --disable-extensions command-line option, and confirm that extensions are temporarily disabled.  
Details: [https://superuser.com/questions/254579/how-to-open-google-chrome-with-extensions-disabled-turned-off](https://superuser.com/questions/254579/how-to-open-google-chrome-with-extensions-disabled-turned-off)

Beyond that, where is the Request error coming from? Is it a script, or a file attempting to be loaded?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 25, 2021, 11:57am UTC](https://forum.freecodecamp.org/t/learn-about-functional-programming-error/321357/12 "2021-01-25T11:57:49Z")

</div>

Closed on January 25, 2021, 11:57am UTC


