r/javascript • • Mar 09 '15

Things every JavaScript developer should know

http://ilikekillnerds.com/2015/03/things-every-javascript-developer-should-know/
326 Upvotes

118 comments sorted by

View all comments

16

u/cosinezero Mar 09 '15

"for (condition 1; condition 2; condition 3)"

...um.

4

u/cosinezero Mar 09 '15

So everyone downvoting me prefers to have three conditions in their FOR loops, eh? How's that working out for ya?

2

u/nschubach Mar 09 '15

(bad; maybeOk; allgoodNow)

2

u/straatman Mar 09 '15

Probably why they needed to read the article

1

u/_somanyguns Mar 09 '15

lololol everything is terrible

2

u/[deleted] Mar 09 '15 edited Mar 09 '15

I don't know why you got downvoted. Condition1 and condition3 are not even conditions. Condition1 is 'do this piece of code on begin', and condition3 is 'do this piece of code every iteration given condition2 is true'. Only condition2 is a condition.

5

u/cosinezero Mar 09 '15

Yep, that's what I was pointing out.

2

u/the_cat_kittles Mar 10 '15

which is what he was pointing out

3

u/straatman Mar 09 '15

Iirc the correct terms are, intitializer, condition, incrementor (depending on operation)