ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which function is used to iterate over a collection in Kotlin?
Correct Answer: B — forEach()
The forEach() function in Kotlin is used to iterate over a collection or array and execute a block of code for each element.