
код у меня есть и ошибка на картинке
import React from 'react';
const Main = () => {
const joiningCriteria = [
'People between the ages of 18 and 35 years.',
'A demonstrated passion for coding and technology.',
'The time and capacity to commit to a full coding bootcamp. Classes are three times per week in person at one of our learning hubs.',
'An intermediate level of English comprehension.',
'The aptitude to succeed in the selection process.',
];
return (
<section class = "bootcamp">
<ol>
{joiningCriteria.map(() => (
<li>{e}</li> /*the error is here it say the (e) is not defined*/
))}
</ol>
</section>
);
};
export default Main;



![Безумие обратных вызовов в javascript [JS]](https://i.imgur.com/WsjO6zJb.png)


Вам нужно добавить e внутри карты в качестве аргумента. Затем ваши значения из массива будут отображаться в виде элементов списка.
<ol>
{joiningCriteria.map((e)=> (<li>{e}</li>))}
</ol>
спасибо за ответ, но я уже пробовал это, но не сработало
Пожалуйста, добавьте (e) на карту нравиться
От
map(()=>
к
map((e)=>
это будет работать
Спасибо
я пробовал это, но не работает, я не знаю, почему
не могли бы вы сообщить об ошибке, которая возникает в консоли
Не удалось скомпилировать. Модуль ./src/index.js не найден: не удается разрешить «./reportWebVitals» в «C:\Users\yadba\OneDrive\Desktop\coding-challenge-yad97-main\src»
так говорит компилятор
попробуйте эту карту (e => (
так же все равно не работает
Чтобы карта работала, вам нужно передать переменную, которая позволяет выбрать каждый элемент. Попробуй это
const joiningCriteria = [
'People between the ages of 18 and 35 years.',
'A demonstrated passion for coding and technology.',
'The time and capacity to commit to a full coding bootcamp. Classes are three times per week in person at one of our learning hubs.',
'An intermediate level of English comprehension.',
'The aptitude to succeed in the selection process.',
];
return (
<ol>
{joiningCriteria.map((e,index)=> {return <li key = {index}>{e}</li>} /*the error is here it say the (e) is not defined*/
)}
</ol>
</section>
); };
Комментарии не для расширенного обсуждения; этот разговор был перемещен в чат.
Что вы пытались отладить проблему? Вы где-нибудь определили
e?