Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ezrakilty
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
ezrakilty
15y ago
The bog-standard for loop that transforms an array mentions the array twice and the index variable five times, giving you, let's say, 6 unnecessary chances to goof something: for (int i = 0; i < array.length; i++) { newarray[i] = f(ar