15 ms·
> For an array of 5-10 items the performance hit of foreach is worth it for readability 100% agree. my point is more about OP's example being used to prove tha
by leeoniya 4y ago
> For an array of 5-10 items the performance hit of foreach is worth it for readability
100% agree. my point is more about OP's example being used to prove that dumb questions get asked. if it's being asked by a good interviewer, it's usually relevant.