Pass an Array as Props join error

Tell us what’s happening:

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>
        { /* change code below this line */ }
        <List tasks={["walk dog","workout"]} />
        <h2>Tomorrow</h2>
        <List/>
        { /* change code above this line */ }
      </div>
    );
  }
};

result i get
// running tests

Cannot read property ‘join’ of undefined

Cannot read property ‘join’ of undefined

Cannot read property ‘join’ of undefined

Cannot read property ‘join’ of undefined

Cannot read property ‘join’ of undefined

Cannot read property ‘join’ of undefined

Cannot read property ‘join’ of undefined

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

Link to the challenge:

You didn’t add a tasks prop to the second <List />.

From the instructions:

Today’s list should have at least 2 tasks and tomorrow’s should have at least 3 tasks.

1 Like

thank you, i have correct it