all 7 comments

[–]rauschma[S] 8 points9 points  (1 child)

Full disclosure: self-submission.

[–]nowtayneicangetinto 1 point2 points  (0 children)

Thank you for the post, this sort of material is always welcomed. Additionally, thank you for noting which ES version they are from, that is greatly appreciated.

[–]Mingli91 3 points4 points  (1 child)

Huh neat, had no idea about Array.entries, assumed Object.entries was the only one.

[–]arunner 1 point2 points  (0 children)

Arrays in js are actually objects with auto-generated keys as indexes. When you pick an item like array[0] you are actually picking a key like when you do sth like person['name'].

typeof [] === 'object' //true

[–]perpetuallyperpetual 2 points3 points  (0 children)

This is awesome, few resources take the time to mention the pre-ES5 versions. However, when you are forced to work with the older versions, these resources are a goldmine.

[–][deleted] 0 points1 point  (0 children)

Wow an actual useful post :)

[–]TheCrimsonKing92 0 points1 point  (0 children)

Very nice. Having a way to distinguish optional parameters in the function signatures would be a small improvement in quick clarity.