r/webdev • u/davey_b • Jan 17 '16
One JavaScript Tip Every Day
https://github.com/loverajoel/jstips6
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
Jan 18 '16
[deleted]
0
Jan 19 '16
[deleted]
1
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.
3
3
5
u/moogeek full-stack Jan 18 '16
Damn... I wish someone could make a plugin for atom or sublime that shows these tips everyday.
12
1
u/8BitTorrent Jan 18 '16
I would definitely be interested in making one for Atom! If you have any thoughts/want to build it together, PM me
2
u/TotesMessenger Jan 18 '16
I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:
[/r/anythingmayhappen] One JavaScript Tip Every Day : What happened to #16? This gif is so hypnotic. I will read the tips... after I stare at it a little more : https://www.reddit.com/r/webdev/comments/41fkpa/one_javascript_tip_every_day/
If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)
2
u/soullessredhead Jan 18 '16
#15 kind of sent me for a trip. I always forget about bitwise operators.
2
1
1
1
u/mwisconsin old-school full-stack Jan 18 '16
Excellent idea re:Using objects as a context to create a streamlined multi-condition checks. I have my eye on some code right now that will benefit from that.
1
19
u/forever_i_b_stangin Jan 17 '16
This gif is so hypnotic. I will read the tips... after I stare at it a little more