that ‘map’ method is slower than ‘forEach’. Take in consideration when working with big sets of data, because it can block main thread for a longer time and affect a website performance.
Careful though, these are NOT the same things! Whereas forEach and map perform a function on each item of your data, a for loop does what the name implies, looping over your data. Consequently, the behavior WILL be different, for instance when fetching data, etc.
Bro you are full of wisdom. Cos Your contents are more than gold. Keep up the good work bro🇬🇭🇬🇭
Appreciate it man thanks for watching 🙏
Clear difference sited out when and where to use it
Thank You sir!
Please what theme do you use in VSCode?
It's my theme. Search for "dcode" on VS Code Extensions Marketplace
that ‘map’ method is slower than ‘forEach’. Take in consideration when working with big sets of data, because it can block main thread for a longer time and affect a website performance.
U explain this stuff very very well
You should do udemy courses
Thank you. I actually do have a few Udemy courses but maybe I should do some more 😎
i am old school guy, still iterating using old but good for :) But I personally feel that i would need modernize myself :)
Yeah just add "map" to your code if you're doing array transformations.
@@dcode-software OK, I'll do it.
Careful though, these are NOT the same things!
Whereas forEach and map perform a function on each item of your data, a for loop does what the name implies, looping over your data. Consequently, the behavior WILL be different, for instance when fetching data, etc.
Your name Dom like Dominic or DOM like Document Object Model? Haha, jk, good stuff there, thanks!