‘FOR’ loops are old news

all have been using ‘for’ loop since we started learning how to code isn’t it? But, what if I told you there was an alternative to the venerable ‘for’ loop?

No matter which programming language it is — be it is Java, C, Python, JavaScript, etc. — we all learnt ‘for’ loop. However, we must always remember that when we code, our main goal is to write as less of a complex code as possible.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store