Give Sibling Elements a Unique Key Attribute help i'm stuck

Tell us what’s happening:

Your code so far



const frontEndFrameworks = [
  'React',
  'Angular',
  'Ember',
  'Knockout',
  'Backbone',
  'Vue'
];

function Frameworks() {
  const renderFrameworks = frontEndFrameworks.map((item, index) => {
     <li key={index}>{item}</li>
     
   })// change code here

  return (
    <div>
      <h1>Popular Front End JavaScript Frameworks</h1>
      <ul>
        {renderFrameworks}
      </ul>
    </div>
  );
};

Your browser information:

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

Link to the challenge:

const renderFrameworks = frontEndFrameworks.map((item, index) => {
     <li key={index}>{item}</li>
     
   })// change code here

You’re missing return keyword. Either remove the curly brackets and make it in-line (or add normal brackets) or add the return keyword

Read more here: Arrow function expressions - JavaScript | MDN

1 Like