Iterating over [key,value] pairs (1/3): arrays for (const [index, value] of myArray.entries()) { console.log(index, value); } http://exploringjs.com/es6/ch_arrays.html#_iterating-over-index-element-pairs …
-
Show this thread
-
Iterating over [key,value] pairs (2/3): maps for (const [key, value] of myMap.entries()) { console.log(key, value); } http://exploringjs.com/es6/ch_maps-sets.html#_iterables-for-entries …
3 replies 4 retweets 24 likesShow this thread
Replying to @rauschma
No need for the explicit .entries() for maps.
9:30 AM - 22 Apr 2018
0 replies
0 retweets
5 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.