Yeah I'm not saying the JS do while is not useful in a "run at least once" way - but it just doesn't read logically at all to me. Reading the code it feels like it says "do a thing while X is true" - but that's not what it means. It really means "do a thing once and then do it while X is true". It feels like a useful hack :)

Follow

@jaywink javascript probably wouldn't have it had they not just taken it from c/java. I wonder where it originated. en.m.wikipedia.org/wiki/Do_whi

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml