In this code snippet, why does the compiler not allow the value of y to change?kotlinfor(y in 1..100) y+=2

🎲 Try a Random Question  |  Total Questions in Quiz: 83  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Kotlin Quiz — practice the complete quiz, review flashcards, or try a random question.

Kotlin MCQs For LinkedIn Skill Assessments.


In this code snippet, why does the compiler not allow the value of y to change?<br>kotlin<br>for(y in 1..100) y+=2<br>