I have a problem. When I type the code in, it normally works, but when I type the word ‘join’ which is required for the code, the tests suddenly shows an error. I really don’t know why, I should be passing at least 3 of them, but it appears, that I failed every single one. Please help.
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={['go out with a dog, play on PC, programme at freecodecamp.org']}/>
<h2>Tomorrow</h2>
<List />
{ /* Change code above this line */ }
</div>
);
}
};
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0
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={['go out with a dog',' play on PC',' learn react']}/>
<h2>Tomorrow</h2>
<List />
{ /* Change code above this line */ }
</div>
);
}
};