- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
The #1 mistake with JS Map & Filter! 🛑 #javascript #coding #programming #quiz
Why is your array empty? or worse... full of undefined? 🕵️♂️
The Trap: When using .map(), if you use curly braces { }, you must use the return keyword. If you don't, JavaScript executes the math but doesn't "give it back" to the new array.
The Fix:
Implicit Return: Remove the braces: nums.map(x → x * 2)
Explicit Return: Keep the braces but add return: nums.map(x → { return x * 2 })
Which style do you prefer? Clean arrows 🏹 or explicit returns? 👇
#javascript #codingtips #webdev #programming #softwareengineer #es6 #reactjs #arraymethods #jscheck #shorts
Видео The #1 mistake with JS Map & Filter! 🛑 #javascript #coding #programming #quiz канала CodeCupps
The Trap: When using .map(), if you use curly braces { }, you must use the return keyword. If you don't, JavaScript executes the math but doesn't "give it back" to the new array.
The Fix:
Implicit Return: Remove the braces: nums.map(x → x * 2)
Explicit Return: Keep the braces but add return: nums.map(x → { return x * 2 })
Which style do you prefer? Clean arrows 🏹 or explicit returns? 👇
#javascript #codingtips #webdev #programming #softwareengineer #es6 #reactjs #arraymethods #jscheck #shorts
Видео The #1 mistake with JS Map & Filter! 🛑 #javascript #coding #programming #quiz канала CodeCupps
Комментарии отсутствуют
Информация о видео
6 февраля 2026 г. 11:02:04
00:00:13
Другие видео канала




















