October 2018
Intermediate to advanced
370 pages
9h 15m
English
The contains function is used to check whether a range contains a specific element:
if(evenRange.contains(2)) { println("Found")} if(oddRange.contains(3)) { println("Found")}
This code checks whether the range of even numbers contains the element 2 and whether the range of odd numbers contains the element 3.
Read now
Unlock full access