iOS Swift Collections and Control Flow Control Flow With Loops For In Loops

Udo von Eynern
Udo von Eynern
5,579 Points

Why do I get a bummer?

I don't understand why I get a bummer with this code.

loops.swift
// Enter your code below
var results: [Int] = []

for multiplier in 1..10 {

}

1 Answer

Alex Koumparos
MOD
Alex Koumparos
Python Web Development Treehouse Moderator 33,475 Points

Hi Udo,

Your problem is in your range operator. Swift has two range operators, the half-open operator (..<) and the closed range operator (...). Given the surrounding context of your code, I think you want the latter.

Cheers

Alex

Udo von Eynern
Udo von Eynern
5,579 Points

Thank you so much, Alex! Did not see the missing point.