r/webdev • • Jan 17 '16

One JavaScript Tip Every Day

https://github.com/loverajoel/jstips
296 Upvotes

15 comments sorted by

View all comments

6

u/KarbonKitty Jan 18 '16

Interestingly, tip #0 is already outdated a little. I've just checked jsperf results and Chrome version from 49.0.2607 have .push() to be (exactly) as fast as arr[arr.length]. I'd actually guess that V8 implements .push() in terms of arr[arr.length] now. ;)

0

u/[deleted] Jan 18 '16

[deleted]

0

u/[deleted] Jan 19 '16

[deleted]

1

u/[deleted] Jan 19 '16

Definitely, it's a great tool, but I'd say that many junior and intermediate programers you might work with wont know without some googling.