DEV Community

sandeepsamanth
sandeepsamanth

Posted on

map ,filter,......

const names = ['john', 'peter', 'susan'];
const newNames = names.map((name) => {
  console.log(name);
  return <h1>{name}</h1>;
});
Enter fullscreen mode Exit fullscreen mode

Top comments (0)