Pass an Array as Props/List component should render the value from the tasks prop in the p tag error

Pass an Array as Props/List component should render the value from the tasks prop in the p tag error
0

#1

Tell us what’s happening:
Hello,
I am getting this error : The List component should render the value from the tasks prop in the p tag.
I am not sure what to do. Can someone help me ? Thank you

Your code so far


const List= (props) => {
  return <p>{props.tasks.join(",")}</p>
};

class ToDo extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div>
        <h1>To Do Lists</h1>
        <h2>Today</h2>
       <List tasks={["cook","bake","love"]}/>
        <h2>Tomorrow</h2>
      <List tasks={["dance","sing","eat"]}/>
      </div>
    );
  }
};

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/pass-an-array-as-props


#2

your missing a space after the comma

const List= (props) => {
  return <p>{props.tasks.join(', ')}</p>
};

happy coding!