For the following code, it will gives exception when include the line {console.log('hello');}
import "./styles.css";
export default function App() {
const ages = [1, 2];
return (
<>
{ages.map((age) => (
{console.log('hello');} //include this code gives unexpected token
<h1>{age}</h1>
))}
</>
);
}
What is the syntax rule that gives this error?