Pass an array of props

Tell us what’s happening:

return

{props.tasks.join(" , “)}


i’ve given this snippet inside the List component and still it is showing that " The List component should render the value from the tasks prop in the p tag.”

Your code so far


const List = (props) => {
{ /* change code below this line */ }
return <p>{props.tasks.join(" , ")}</p>
{ /* change code above this line */ }
};
class ToDo extends React.Component {
constructor(props) {
  super(props);
}
render() {
  return (
    <div>
      <h1>To Do Lists</h1>
      <h2>Today</h2>
      { /* change code below this line */ }
      <List tasks={["walk","swim"]}/>
      <h2>Tomorrow</h2>
      <List tasks={["dance","cook","football"]}/>
      { /* change code above this line */ }
    </div>
  );
}
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36.

Challenge: Pass an Array as Props

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

return <p>{props.tasks.join(" , ")}

You have a space before and after ,. Should be just after.

thank you.
a space matters in react right?
:laughing: