# Learn Modern JavaScript Methods by Building Football Team Cards - Step 25

**URL:** <https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [April 12, 2024, 11:01am UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021 "2024-04-12T11:01:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katereverie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/katereverie/32/338298_2.png) [@Katereverie](https://forum.freecodecamp.org/u/Katereverie)\
**Post date:** [April 12, 2024, 11:01am UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021/1 "2024-04-12T11:01:47Z")

</div>

I have a question about this step, specifically about empty callback functions.

My previous code didn’t pass:

```auto
playerCards.innerHTML = arr.map (function( ) { });

```

I eventually figured it out by passing in another form of empty callback functions.

What I do not understand is:  
There seems to be two forms of empty callback functions (unless there is only one form)  
Why is the empty callback function as provided above not acceptable in this step?

### Challenge Information:

Learn Modern JavaScript Methods by Building Football Team Cards - Step 25

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-modern-javascript-methods-by-building-football-team-cards/step-25)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![hasanzaib1389](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hasanzaib1389/32/377602_2.png) [@hasanzaib1389](https://forum.freecodecamp.org/u/hasanzaib1389)\
**Post date:** [April 12, 2024, 2:31pm UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021/2 "2024-04-12T14:31:52Z")

</div>

```auto
playerCards.innerHTML = arr.map (function( ) { });

```

This is wrong formation of a call back function. It’s Have a extra `function` word and missing aero `=>` after empty `()` parentheses.  
@Katerevrie

---

<div class="post-metadata">

**Author:** ![Katereverie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/katereverie/32/338298_2.png) [@Katereverie](https://forum.freecodecamp.org/u/Katereverie)\
**Post date:** [April 12, 2024, 5:33pm UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021/3 "2024-04-12T17:33:37Z")

</div>

As I understood it,

_( ) =\> { }_ and _function () {}_ are two types of functions that can be used as an empty callback function.

The first type is called an arrow function. The second is called a regular function. Both can be used as an empty callback function.

My question was, why is the first kind not recognized as admissible for THIS step of the tutorial project.

If you mean an empty callback function can only use an arrow function, could you provide me with the documentation or source of this information? Because I read that both functions can be used as callback functions.

Thanks.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [April 12, 2024, 5:58pm UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021/4 "2024-04-12T17:58:00Z")

</div>

The map method accepts regular functions in addition to arrow functions.

Here is a codepen example using different ways to use map with callbacks

> **[Callback examples](https://codepen.io/Jessica-Wilkins-the-flexboxer/pen/OJGEYbb?editors=0011)**
>
> ...

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [April 12, 2024, 5:58pm UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021/5 "2024-04-12T17:58:41Z")

</div>

> [@Katereverie](#):
>
> My question was, why is the first kind not recognized as admissible for THIS step of the tutorial project.

because it is a bug in the tests.

The tests were written to only accept arrow functions

I created an issue here

> <https://github.com/freeCodeCamp/freeCodeCamp/issues/54380>
>
> \### Describe the Issue
> 
> A camper on the forum ran into an issue here 
> 
> https:/…/forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021
> 
> They wanted to know why they couldn't pass with a regular function for the callback.
> 
> \`\`\`js
> playerCards.innerHTML += arr.map (function( ) { });
> \`\`\`
> 
> the directions don't specify it should be an arrow function instead.
> but both answers should pass.
> So the tests should be updated. 
> 
> \### Affected Page
> 
> https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-modern-javascript-methods-by-building-football-team-cards/step-25
> 
> \### Your code
> 
> see explanation above
> 
> \### Expected behavior
> 
> see explanation above
> 
> \### Screenshots
> 
> \_No response\_
> 
> \### System
> 
> \- Device: \[e.g. iPhone 6, Laptop\]
> \- OS: \[e.g. iOS 14, Windows 10, Ubuntu 20.04\]
> \- Browser: \[e.g. Chrome, Safari\]
> \- Version: \[e.g. 22\]
> 
> 
> \### Additional context
> 
> \_No response\_

---

<div class="post-metadata">

**Author:** ![Katereverie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/katereverie/32/338298_2.png) [@Katereverie](https://forum.freecodecamp.org/u/Katereverie)\
**Post date:** [April 12, 2024, 6:29pm UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021/6 "2024-04-12T18:29:07Z")

</div>

Thanks for the clarification.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [October 12, 2024, 6:29am UTC](https://forum.freecodecamp.org/t/learn-modern-javascript-methods-by-building-football-team-cards-step-25/685021/7 "2024-10-12T06:29:18Z")

</div>

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