In my experience I always go with arrays too because of exactly what you said, all of the super helpful methods on the array. I know sets have their place but it’s almost like I’m working in binary code compared to the array.
The only benefit that set has is the unique value which is very helpful at some points because in arrays, it's very hard to do it, usually I have to loop through an array or create another comparison array just to do it. Set makes this problem much easier.
the only real value of sets in my knowledge is to incorporate a reverse index algorithm and use sets for the reversed index of the objects, since you want in such case every value to be unique and store inside it the id of the object
WATCH NEXT: Javascript Interview Questions and Answers - Dominate Your Next Interview - th-cam.com/video/wnYKH2dO620/w-d-xo.htmlsi=5DfbGEfhXWiiv0a_
Thanks for this. I find Set very useful for removing duplicates in existing arrays.
Ah cool! I'm going to start using them for this
Yeap!
In my experience I always go with arrays too because of exactly what you said, all of the super helpful methods on the array. I know sets have their place but it’s almost like I’m working in binary code compared to the array.
Yeap. I use objects and arrays 99% of the time
I think word of "List" is much suitable for "[]"
classes like "Int8Array" are much more for word of "Array"
Sets work great if you need to store IDs (which need to be unique).
Yeap
The only benefit that set has is the unique value which is very helpful at some points because in arrays, it's very hard to do it, usually I have to loop through an array or create another comparison array just to do it. Set makes this problem much easier.
I totally agree!
the only real value of sets in my knowledge is to incorporate a reverse index algorithm and use sets for the reversed index of the objects, since you want in such case every value to be unique and store inside it the id of the object
Yeap. Sets application is super narrow and rarely needed.
I'm first here :)
I'm third here :)
I’m at 3
Fyi: taking a breath between sentences is completely acceptable and can even be beneficial for communication clarity and overall delivery.
Yeah, if you enjoy watching 30+ min videos. I much prefer the fast paced approach. I'm sure others appreciate it too.
Exactly. I'm trying to minimize unnecessary time
@@MonsterlessonsAcademy😂😂😅 great comeback
I'm second here :)