Home »
MCQs »
Scala MCQs
What is the range defined by the below statement?
21. What is the range defined by the below statement -
range(13, 17, 2)
- 13 14 15 16 17
- 13 14 15 16
- 13 15
- 13 15 17
Answer: C) 13 15
Explanation:
The range will exclude the last value and iterate by 2 for each value.