Question: The code below is expected to display the numbers from 1 to 10, but it does not. Why?

  1. You cannot assign a sequence to a variable
  2. To produce result, a sequence must have terminal operation. In this case, it needs a `.toList()`
  3. The `.filter{ it < 11 }` should be `.filter{ it > 11 }`
  4. The `yieldAll(1..20)` should be `yieldAll(1..10)`

Answer: The correct answer of the above question is Option B:To produce result, a sequence must have terminal operation. In this case, it needs a `.toList()`