Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Swift Collections and Control Flow Control Flow With Conditional Statements Working With Logical Operators

Joseph Perl
Joseph Perl
877 Points

Help with Challenge Question. Swift If Statements.

Hello. I can't get my code to work. Please help.

Thanks

operators.swift
var results: [Int] = []


for n in 1...100 {
  if n !a even && n%7 == int {
    result.append(n)
  }
}

3 Answers

Joseph Perl
Joseph Perl
877 Points

Thank you very much Alphonso! I got the code to work.

Is there a way that I can search for forum topics and questions based on the video or challenge question that I'm watching?

Alphonso Sensley II
Alphonso Sensley II
8,514 Points

You can type in parts of the challenge question in the search bar. That will usually get you close to what you need help with.

Joseph Perl
Joseph Perl
877 Points

Thank you Alphonso. I'll try that.