and Array#isEmpty is still not there
https://twitter.com/mathias/status/1090380500739506176 …
By adding it to Array.prototype as you suggest, it’d similarly be tricky to use it with a different type of collection.
-
-
yes, but it's a step forward, it helps defining an interface of a collection. What if I also have Stream objects in my program? Streams don't have a length but I can ask them for emptiness
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.
New JavaScript features in ES2019:
Array#{flat,flatMap}