Cheat sheet: creating Arrays http://2ality.com/2018/12/creating-arrays.html#cheat-sheet-creating-arrays …pic.twitter.com/RcQMQUYXoh
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
The former assumes more knowledge about JavaScript. And it feels slightly hacky and more brittle to me (e.g. typo in property name). /cc @joseph_silber
I don’t think it assumes more JS knowledge; it can just be taught as a separate pattern. Array.from(new Array(3)) reads as “create an array from an array of length 3” which feels redundant (to me).
You're a genius Sir! Wow!! I never would have thought of this "shortcut". Plus, this is very performant for writing idiomatic javascript (i.e. You don't create "packed" arrays from "holey" arrays).
Array.from('lol')
no, I meant Array.from('YOLO')
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.