Pass an Array as Prop

Pass an Array as Prop
0

#1

it is still not executing

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0.

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


#2

Make sure there is a space after comma when you are joining them into strings.