App.js
import React from 'react'
// Home.js -> Header.js + Content.js + Footer.js
// Blog.js -> Header.js + Comments.js + Footer.js
const arr = [{
name: 'Prabin',
rollnumber: 1
}, {
name: 'ABC',
rollnumber: 2
}]
function App() {
return(
<ul>
{arr.map(elem => <li key={elem.rollnumber}>
{elem.rollnumber} - {elem.name}</li>)}
</ul>
)
}
export default App
No comments:
Post a Comment