Question:

What output will be produced by the code below?

for i in 1...3 {
    print(i)
}

Answer:

Correct answer: 1, 2, 3.

Explanation: This uses the closed range operator (...) to loop from 1 to 3 inclusive.


Keywords:

© 2017 QuizBucket.org