Lists
List creation, element access, size, and transformation with map.
Simple enough for a 5-year-old to understand
Create and access a list
In Scala, a List is immutable. Elements are accessed using a zero-based index.
val colors = List("red", "purple", "green")println(colors(0))println(colors.length)🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)