Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React exercise pass-an-array-as-props test case not passing #17758

Closed
prvn3294 opened this issue Jun 29, 2018 · 4 comments
Closed

React exercise pass-an-array-as-props test case not passing #17758

prvn3294 opened this issue Jun 29, 2018 · 4 comments

Comments

@prvn3294
Copy link

Hi,

I was facing one problem while solving the exercise ( pass-an-array-as-props ) of React here is the link, https://learn.freecodecamp.org/front-end-libraries/react/pass-an-array-as-props

I followed every steps and able to render as per requirement of test case but test case ( The List component should render the value from the tasks prop in the p tag. ) failed, Please let me know if its a bug or there is some probelem in my code,

Here is my code

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={["Hello","Hi","Hihih"]}/>
        <h2>Tomorrow</h2>
        <List tasks={["Hey","There","Yo"]}/>
        { /* change code above this line */ }
      </div>
    );
  }
}

Cheers to FreeCodeCamp <3

@Nirajn2311
Copy link
Member

@ranavc32 You forgot to put a space after the comma on line 3, it should be:
return <p>{props.tasks.join(', ')}</p>

@prvn3294
Copy link
Author

@Nirajn2311 , Thanks Man :) I wasn't able to notice this small typo. Thanks a lot 👍

@AnonymousLords
Copy link

AnonymousLords commented Jun 29, 2018

Please try and post something like this on the FCC forums and confirm it is a actual issue before here.
--> https://forum.freecodecamp.org/
Also close the issue.

@prvn3294
Copy link
Author

@AnonymousLords , I will keep this in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants