score:1

Accepted answer
{this.props.cards.map((card, index) => (
  <Card key={index} style={{ width: "18rem" }}>
    <Card.Img variant="top" src="holder.js/100px180" />
    <Card.Body>
      <Card.Title>{card.title}</Card.Title>
      <Card.Text>{card.body} </Card.Text>
      <Button variant="primary">Go somewhere</Button>
    </Card.Body>
  </Card>
))}

score:1

var myObject = { 'a': 1, 'b': 2, 'c': 3 };

Object.keys(myObject).map(function(key, index) {
  myObject[key] += 1;
});

console.log(myObject);
// => { 'a': 2, 'b': 3, 'c': 4 }

score:1

this.props.cards.map((card, index) => ..

score:1

class FrontCard extends Component {
  render() {
    return (
      <div>
        {this.props.cards.map((card, index) => (
          <Card key={index} style={{ width: "18rem" }}>
            <Card.Img variant="top" src="holder.js/100px180" />
            <Card.Body>
              <Card.Title>{card.title}</Card.Title>
              <Card.Text>{card.body} </Card.Text>
              <Button variant="primary">Go somewhere</Button>
            </Card.Body>
          </Card>
        ))}
      </div>
    );
  }
}

Related Query

More Query from same tag