100% of the time that I use Sets I'm caught out by the fact that .length doesn't work and you have to use .size :(
-
-
Replying to @Jack_Franklin
The idea is that an Array is ordered and has a length that can be measured, whereas a Set is (mainly) unordered. Similar: strings have lengths, Maps have sizes.
3 replies 1 retweet 10 likes -
Replying to @rauschma @Jack_Franklin
I see what you’re saying (“mainly”), but for those following along, it might be worth pointing out that JS Maps and Sets are ordered.
1 reply 1 retweet 3 likes -
Replying to @mathias @Jack_Franklin
What is your suggestion for making this point succinctly? One possibility is to switch from “ordered” to “indexed”.
1 reply 0 retweets 2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.