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

Im not sure what went wrong.....

what am supposed to do here? SUPER CONFUSED

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

 for multiplier in 1...10 {
   print("\(multiplier * 6)" )
   results.append(multiplier)

 }

1 Answer

Magnus Hållberg
Magnus Hållberg
16,953 Points

You are almost there, what you have in your print method you could use in the append method instead.

results.append(multiplier * 6)

Delete the print method, you don't need that.