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

Order Issues

I need help with some code I wrote.

var test = 2                                                                                                                                                                           
var actual = 1                                                                                                                                                                           
if actual == test - 1 {                                                                                                                                                          
actual = test                                                                                                                                                                      
}

that works and then actual = 2(test) if I change test to 3, I want actual to then stay at 2 and update to 3. That doesn't work. Anyone know how to fix this? please respond!

I am sorry, I don't understand your question. Could you explain a little bit more what you are trying to accomplish?