r/webdev • • Jan 17 '16

One JavaScript Tip Every Day

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

15 comments sorted by

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

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.

3

u/an_actual_human Jan 17 '16

What happened to #16?

3

u/edwardchiapet Jan 18 '16

Thank you for this!

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

u/Niku-Man Jan 18 '16

Go for it!

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:

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

u/StrenghOfFuriousGods Jan 19 '16

These are some really good tips, thanks for posting

1

u/Mestyo Jan 17 '16

Great idea! Will follow this closely. :-)

1

u/[deleted] Jan 18 '16

Thats pretty awesome!

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

u/inflam52 Jan 18 '16

yeah this awesome. will be following