![For each kotlin](https://cdn3.cdnme.se/5447227/9-3/21_64e61dfdddf2b33c615a3cd4.png)
So this is the benefit of using the for-each loop which offers many functions such as it reduces the lines of code saving the developer’s time, effort, and of course the cost. Also, the output appears to be the uppercase as we have not removed the uppercase function. This is the in-built function available to us by the kotlin. This is done by the function named as the reversed (). We can see in the output that all the names have been reversed. In this lesson, youll learn how to use the forEach operator to loop over a collection in Kotlin.Watch the entire FREE Kotlin Programming course here: https. The values we want to insert are John, Ishank, Rocky, Aditya. Suppose we have a list and we want to print it. So let us see the demo for the for each loop. It also helps us to increase the efficiency of the code.
![for each kotlin for each kotlin](https://thebroodle.com/wp-content/uploads/2018/11/Kotlin-has-covered-up-the-market-easily.jpg)
It also provides the functionality to re-run the same lines of code again and again but has certain advantages that help to reduce the code and make it easy to use for the programmers and the developers.
![for each kotlin for each kotlin](https://www.jquery-az.com/wp-content/uploads/2019/05/6.1-Kotlin-while-loop.png)
Kotlin for each loop also does the same work for us. The Highest Score is 130 Kotlin forEach Loop
![for each kotlin for each kotlin](https://res.cloudinary.com/practicaldev/image/fetch/s--2Ne4W84W--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/32asqveh7qg6yko4g0p4.png)
Python Map Function and Lambda applied to a List #shorts
![For each kotlin](https://cdn3.cdnme.se/5447227/9-3/21_64e61dfdddf2b33c615a3cd4.png)