rauschma / exploring-js

20 stars 0 forks source link

Chapter: Control flow statements #16

Open rauschma opened 6 years ago

rightpad commented 6 years ago

The exercise: exercises/control-flow/month_to_number_test.js seems to be reversed based on the writing. I was expecting to write a switch statement that takes a string of the month and outputs a number, however the test seems to be the reverse of that. Is this intended?

rauschma commented 5 years ago

@da-moo Good point! That’ll be fixed in the next release.

kswope commented 5 years ago

I think its more illuminating to explain a do-while loop as a loop that always runs a block of code once, unlike a while loop, which might not run at all. Beginners might not get the point.

Wiki makes this point right out of the gate.

https://en.wikipedia.org/wiki/Do_while_loop

rauschma commented 2 years ago

@kswope I’ve added a note that’ll be in the next release.