Number 9 is my favorite. For number 4 if you want to empty an array declared with var or let I think it better to reassign it with an empty array instead:
varfruits=[“banana”,“apple”,“orange”,“watermelon”,“apple”,“orange”,“grape”,“apple”];fruits=[];//do this not fruits.length = 0;
Nice article! Number 3: Using .map is much easier and we can use object destructuring if you want to pull a specific value. 😄 This should give you the same result.
Software hacker working in the industry since 2003. Currently loves: #Typescript and #Svelte and #golang. Founder of Chimera, the first makerspace in northern California.
Number 9 is my favorite.
For number 4 if you want to empty an array declared with
var
orlet
I think it better to reassign it with an empty array instead:This is really nice to read..informative post is very good to read..thanks a lot! Connections wordle
Great sources; we appreciate you taking the time to find them and share them with us. word wipe
Nice article!
Number 3: Using
.map
is much easier and we can use object destructuring if you want to pull a specific value. 😄This should give you the same result.
Yup its, 3 hehe 3 is just another solution for map.. But I will say, map is still powerful. 😁
Nice! Number 5 was a new one for me and seems pretty useful, thanks! 🙏
nice, thanks that the article showed you new things :)
Thank you for this useful article!
no problem men hehe 😁
In 11 you should add a note that the original array is reversed (alternatively just do
y = x.slice().reverse()
)How can we find unique values in an array without using map function.
This is also a very good post which I really enjoy reading. It is not everyday that I have the possibility to see something like this. 먹튀검증사이트
Thanks for the article! Really useful. 👍
I am a newbie in this aspect and I believe that jour tips can help me. Thx a lot!