Pass an Array as Props - tests not working?!

Pass an Array as Props - tests not working?!
0

#1

Tell us what’s happening:
So I am really lost as to why this is not working at all. I hit run the test but nothing is happening.

Please advice, before I lose all of my hair :frowning:

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>
         <List tasks= { ["sleep","eat","code"] } />
         <h2>Tomorrow</h2>
        <List tasks= { ["Sleeping","watching tv","some freecodecamp"] } />
      </div>
    );
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15.

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


#2

What errors do you see in your browser’s console?


#3

Hi Randell,

This is what I get:


#4

You are getting that, because you are using invalid characters in your join method.


#5

ok thanks for the heads up, I will try and figure this out!


#6

Strings are either straight double quotes or straight single quotes.


#7

Done!! Thanks again Randell. :). These are the things I need to brush up on, spotting errors!