List Manipulation
var seas = listOf("Black Sea", "Caribbean Sea", "North Sea")
println(seas. contains("North Sea")) // Prints: true
// The contains() function performs a read operation on any list and determines if the element exists
seas.add("Baltic Sea") // Error: cannot write to immutable list
// The add() function can only be called on mutable lists, so the code above throws an error
Comments