Question: I'm trying to demonstrate a cost function right now and wondering if there's a way to traverse the parabola by adding plot in the same subplot and figure.

```
def costfuntion(b, a):
    # b Value
    x = np.linspace(b*(-b), b*(b), 100)
    y = (x - a)**2
    return y

```

My Plot Attempt:

```
plt.plot(costfuntion(20,5))
plt.ylabel("Cost Value");

#b = 'some b value'
plt.plot(b, marker='o', color='b')

```

[What I'm trying to mimic](https://www.youtube.com/watch?v=Gvq9sUHPgrc)
(Around: 1:13)

[![enter image description here](https://i.stack.imgur.com/0PZeT.png)](https://i.stack.imgur.com/0PZeT.png)

Answer: 
`Array.forEach` does not return anything. You need to use `Array.map`. Also you should be returning the component to be rendered in the callback.

```
return ( 
  <div>
      {this.state.articles.map((card) => (
          <ArticleCard {...card} />
      )}
  </div>
)

```
Instead of using forEach, you should use `map` function on array, and with `return` keyword to return each and every `ArticleCard`

```js
return( 
<div>
  {this.state.articles.map((card) => {
    return <ArticleCard {...card} />
  })}
</div>
)

```