4 ms·
There is one way to iterate over things, for any kind of elementwise processing: a `for` loop. There is one way to format your code ;)
by sagichmal 6y ago
There is one way to iterate over things, for any kind of elementwise processing: a `for` loop.
There is one way to format your code ;)
- tsimionescu 6y agoThere are still two ways: the C-style for loop and its variants (for initializer; condition; increment) and the range for loop with its variants (iterate by key, by value, or both). There's also the option of writing a recrusive function. Still less than Java's five (do-while, while, C-style for, range for, recursion), to be fair.