Give Sibling Elements a Unique Key Attribute - is this a bug?

Tell us what’s happening:
There is an error in my code but it passes anyway.
(Is it worth reporting as an issue?)

Your code so far



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

function Frameworks() {
  const renderFrameworks = frontEndFrameworks.map((y,i) => {
    return <li key={i}>y</li>
  })
  return (
    <div>
      <h1>Popular Front End JavaScript Frameworks</h1>
      <ul>
        {renderFrameworks}
      </ul>
    </div>
  );
};

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/67.0.3396.99 Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/give-sibling-elements-a-unique-key-attribute

Yeah it looks like a bug.

It’s always worth reporting them to make exercises more resilient :slight_smile:

Ok, I have reported it on GitHub now. :+1:

1 Like