Тёмный

Is This the Most Useful JavaScript Method? 

dcode
Подписаться 133 тыс.
Просмотров 1,2 тыс.
50% 1

Methods such as map(), filter(), every() & reduce() are useful, but which one would you choose if you couldn't use one of the other 3 again? Let's find out.
For your reference, check this out:
developer.mozilla.org/en-US/d...
🏫 My Udemy Courses - www.udemy.com/user/domenic-co...
🎨 Download my VS Code theme - marketplace.visualstudio.com/...
💜 Join my Discord Server - / discord
🐦 Find me on Twitter - / dcodeyt
💸 Support me on Patreon - / dcode
📰 Follow me on DEV Community - dev.to/dcodeyt
📹 Join this channel to get access to perks - / @dcode-software
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
#dcode #javascript

Опубликовано:

 

7 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@EricEGunes
@EricEGunes 27 дней назад
Absolutely!!! Reduce() ! You can do same jobs if you know how to! - but the performance results for processing an array of 100,000 elements: • map() took approximately 0.044 seconds • reduce() took approximately 19.010 seconds
@beratyilmaz7951
@beratyilmaz7951 27 дней назад
not true, write your code so we can test it
@raven.4815
@raven.4815 27 дней назад
A whooping 19 secs? That's absolute madness
@alexanderkomanov4151
@alexanderkomanov4151 25 дней назад
Nice one! Thanks!
@marshallgraphic
@marshallgraphic 27 дней назад
I don't think result && ... will reassign the value to result, or am I mistaking the prev result is the value of the previous return value?
@mimosveta
@mimosveta 26 дней назад
it will
@dcode-software
@dcode-software 26 дней назад
Yeah it works because once it reaches the first element that gives "false", the value can't ever evaluate to "true" ever again because we use &&
@mimosveta
@mimosveta 26 дней назад
I knew of it for few years, and basically never used it, but I think I will start now... I guess I'll first use it to translate other methods to reduce, just to get used to it...
@dcode-software
@dcode-software 26 дней назад
Yeah sure, but of course, I'm not suggesting you replace "map" with "reduce". If the method exists for the purpose then definitely use it. This video is more for education
@usagiakimbo2506
@usagiakimbo2506 27 дней назад
Good examples, thanks for this
@dcode-software
@dcode-software 26 дней назад
All good 👍
@bmehder
@bmehder 27 дней назад
reduce() is the god method
@dcode-software
@dcode-software 26 дней назад
💪
@suelingsusu1339
@suelingsusu1339 27 дней назад
Beautiful.... 👌👌👌👌👌👏👏👏👏🙏🙏🙏🙏🌹🌹🌹🌹🌹🖖🖖🖖🖖🖖🖖
@dcode-software
@dcode-software 26 дней назад
Many many thanks
Далее
JavaScript DESTRUCTURING in 8 minutes! 💥
8:41
Просмотров 16 тыс.
The Most Important Skill You Never Learned
34:56
Просмотров 184 тыс.
Бмв сгорела , это нормально?
01:01
STOP Using Classes In JavaScript | Prime Reacts
14:02
Просмотров 229 тыс.
If this ships, it will change javascript forever
25:54
Просмотров 199 тыс.
5 Useful F-String Tricks In Python
10:02
Просмотров 287 тыс.
Generics: The most intimidating TypeScript feature
18:19
Why You Shouldn't Nest Your Code
8:30
Просмотров 2,6 млн
Learn Closures In 13 Minutes
13:22
Просмотров 58 тыс.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Dear Functional Bros
16:50
Просмотров 487 тыс.