Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Juan Juarez Baldizon
    PLUS
    Juan Juarez Baldizon
    Courses Plus Student 3,352 Points

    content after entering print command has \n attached to it, how to remove this?

    Posted January 29, 2016 9:33pm by Juan Juarez Baldizon
    Juan Juarez Baldizon
    Courses Plus Student 3,352 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Johnny Wright
    Johnny Wright
    643 Points

    println is not an option on my playground. Any answers to why that is. thank you

    Posted November 29, 2015 10:03pm by Johnny Wright
    Johnny Wright
    643 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Igor Alves
    PLUS
    Igor Alves
    Courses Plus Student 4,115 Points

    where can i get exercises to practice more?

    Posted November 13, 2015 12:19pm by Igor Alves
    Igor Alves
    Courses Plus Student 4,115 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    0 Answers

  • Daniel Morgenstein
    Daniel Morgenstein
    744 Points

    When I type in print"\(number) it gives me an error for the " and the \ on the newest version of swift

    Posted October 28, 2015 9:23pm by Daniel Morgenstein
    Daniel Morgenstein
    744 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Omotayo Olawepo
    Omotayo Olawepo
    2,803 Points

    'hey guys i'm really having problems with string interpolation. here is my code i have no idea what i.m doing wrong .

    Posted October 22, 2015 6:39pm by Omotayo Olawepo
    Omotayo Olawepo
    2,803 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Souleymane Coulibaly
    Souleymane Coulibaly
    3,982 Points

    Xcode randomly crashing any help? (Xcode quit Unexpectedly)

    Posted October 21, 2015 11:55pm by Souleymane Coulibaly
    Souleymane Coulibaly
    3,982 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    0 Answers

  • jurgen meco
    jurgen meco
    30 Points

    I'm stuck with this

    Posted October 11, 2015 2:17pm by jurgen meco
    jurgen meco
    30 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    0 Answers

  • Danya Baron
    Danya Baron
    3,170 Points

    Why is Xcode only printing out last item of array?

    Posted October 10, 2015 3:40pm by Danya Baron
    Danya Baron
    3,170 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    3 Answers

  • Brian Patterson
    Brian Patterson
    19,588 Points

    Assistant Editor does not show the right result.

    Posted October 1, 2015 8:32pm by Brian Patterson
    Brian Patterson
    19,588 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • alemayehu kfle
    alemayehu kfle
    525 Points

    Everytime I type println, the word is supposed to change to blue, but it's n doing that on my xcode, any suggestions?

    Posted September 26, 2015 5:15am by alemayehu kfle
    alemayehu kfle
    525 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Nate Grant
    Nate Grant
    23,695 Points

    Code challenge, Can't fix for in loop 1...7

    Posted July 11, 2015 2:05pm by Nate Grant
    Nate Grant
    23,695 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    2 Answers

  • Don Rhoads
    Don Rhoads
    428 Points

    for-in format

    Posted July 9, 2015 11:12pm by Don Rhoads
    Don Rhoads
    428 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • boris said
    boris said
    3,607 Points

    when i try and do the loop it does this

    Posted July 8, 2015 2:59am by boris said
    boris said
    3,607 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • ayushagarwal2
    ayushagarwal2
    982 Points

    for number in 1..<10 excludes 10. However, doing 1<..10 to exclude 1 does not work. How does one do that?

    Posted June 3, 2015 7:02am by ayushagarwal2
    ayushagarwal2
    982 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    3 Answers

  • carlosdiaz11
    carlosdiaz11
    1,810 Points

    if the FOR - IN loop implicitly uses a constant, could it be used in anyway to modify the value of each element?

    Posted May 12, 2015 12:34pm by carlosdiaz11
    carlosdiaz11
    1,810 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Jesse Lopez
    Jesse Lopez
    1,870 Points

    What is the Console Output for?

    Posted March 28, 2015 7:56am by Jesse Lopez
    Jesse Lopez
    1,870 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Bruno Carlos
    Bruno Carlos
    431 Points

    Tool Presentation

    Posted March 10, 2015 12:31am by Bruno Carlos
    Bruno Carlos
    431 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    3 Answers

  • Marie Jose Lemiere
    Marie Jose Lemiere
    872 Points

    My Console Output is not the same in the For-In numbers example

    Posted February 16, 2015 2:56pm by Marie Jose Lemiere
    Marie Jose Lemiere
    872 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    0 Answers

  • Harry Stebbings
    Harry Stebbings
    1,097 Points

    Remind me: why do we use a \ on the 2nd line before number?

    Posted January 29, 2015 1:27pm by Harry Stebbings
    Harry Stebbings
    1,097 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    2 Answers

  • Oliver Wan
    PLUS
    Oliver Wan
    Courses Plus Student 517 Points

    Too Complicated... : (

    Posted January 18, 2015 6:50am by Oliver Wan
    Oliver Wan
    Courses Plus Student 517 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Unsubscribed User
    Unsubscribed User
    355 Points

    A for-in-loop Constant

    Posted December 24, 2014 11:32pm by Unsubscribed User
    Unsubscribed User
    355 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Joshua Alberola
    Joshua Alberola
    1,491 Points

    I'm just confused why we use a constant in For In Loops? We are changing the output- isn't that a variable?

    Posted December 1, 2014 12:44am by Joshua Alberola
    Joshua Alberola
    1,491 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    2 Answers

  • Josh Schlabach
    Josh Schlabach
    1,771 Points

    What exactly does the print function do in apps? Does it do anything important?

    Posted November 18, 2014 9:48pm by Josh Schlabach
    Josh Schlabach
    1,771 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    1 Answer

  • Jonathan Dueck
    Jonathan Dueck
    4,596 Points

    A for-in loop is: "For Constant in Array {}". How can it be a constant if its value changes each time through the loop?

    Posted November 15, 2014 4:01pm by Jonathan Dueck
    Jonathan Dueck
    4,596 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    2 Answers

  • Hakam Badwal
    PLUS
    Hakam Badwal
    Courses Plus Student 748 Points

    How do you make the curly brackets appear at the same time. I have to each one manually.

    Posted November 7, 2014 9:59pm by Hakam Badwal
    Hakam Badwal
    Courses Plus Student 748 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    4 Answers

  • Ludwing Najera
    Ludwing Najera
    4,596 Points

    Invalid escape sequence in literal?

    Posted October 17, 2014 2:53pm by Ludwing Najera
    Ludwing Najera
    4,596 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    6 Answers

  • Erica DeJoannis
    Erica DeJoannis
    640 Points

    If a constant's value can't change, why does a for in loop use a constant if the value of it is going to change?

    Posted October 10, 2014 2:45am by Erica DeJoannis
    Erica DeJoannis
    640 Points
    • iOS
    • Swift Basics (retired)
    • Control Flow
    • For-In Loop

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord