Loops using for and while and suchlike are a bit outdated these days. Use pipeline operations like map and filter instead. They are easier to read and more flexible.
for
while
Back to All Code Smells