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
  • Michael Hanna
    Michael Hanna
    17,649 Points

    Code will not compile in challenge, compiles ok in Xcode

    Posted December 5, 2016 2:18am by Michael Hanna
    Michael Hanna
    17,649 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Ross Koller
    Ross Koller
    340 Points

    var shoppingListArray = ["toothpaste", "bread", "eggs"] that is the code that I entered, what am I doing wrong? Thanks

    Posted July 11, 2016 11:21pm by Ross Koller
    Ross Koller
    340 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Mike Smrcka
    Mike Smrcka
    14,484 Points

    Having trouble making a variable after i make an array for data collection.

    Posted July 7, 2016 5:51pm by Mike Smrcka
    Mike Smrcka
    14,484 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Frenklin Hasani
    Frenklin Hasani
    1,754 Points

    Whats wrong?

    Posted May 11, 2016 9:06pm by Frenklin Hasani
    Frenklin Hasani
    1,754 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Joshua Gatonyi
    Joshua Gatonyi
    679 Points

    Challenge Task help

    Posted October 13, 2015 12:58pm by Joshua Gatonyi
    Joshua Gatonyi
    679 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Michael Southon
    Michael Southon
    1,951 Points

    Create an array named shoppingList and add the following items as strings - "toothpaste", "bread", "eggs".

    Posted September 15, 2015 10:52pm by Michael Southon
    Michael Southon
    1,951 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Mathias Bakken
    Mathias Bakken
    3,167 Points

    Using array subscripting, retrieve the string "bread" from the array and assign it to a variable named cart. Help!

    Posted August 18, 2015 8:57pm by Mathias Bakken
    Mathias Bakken
    3,167 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Jaskirat Singh
    Jaskirat Singh
    1,652 Points

    What?

    Posted July 30, 2015 7:56pm by Jaskirat Singh
    Jaskirat Singh
    1,652 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    4 Answers

  • Ricardo Gonzalez
    Ricardo Gonzalez
    2,286 Points

    How am I suppose to remove a string from the array and then assign it to a variable?

    Posted July 28, 2015 9:14pm by Ricardo Gonzalez
    Ricardo Gonzalez
    2,286 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    3 Answers

  • Yale Wang
    Yale Wang
    1,015 Points

    Swift array Question

    Posted May 30, 2015 8:10pm by Yale Wang
    Yale Wang
    1,015 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Thomas Vogt
    PLUS
    Thomas Vogt
    Courses Plus Student 5,308 Points

    solution wrong?

    Posted May 7, 2015 1:39pm by Thomas Vogt
    Thomas Vogt
    Courses Plus Student 5,308 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Thomas Vogt
    PLUS
    Thomas Vogt
    Courses Plus Student 5,308 Points

    quiz not working

    Posted May 5, 2015 3:45pm by Thomas Vogt
    Thomas Vogt
    Courses Plus Student 5,308 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    0 Answers

  • Hammad Nasir
    PLUS
    Hammad Nasir
    Courses Plus Student 2,801 Points

    I don't know why it is not working, I think my code is right!

    Posted April 20, 2015 8:12pm by Hammad Nasir
    Hammad Nasir
    Courses Plus Student 2,801 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Rodolfo Ocampo
    Rodolfo Ocampo
    2,663 Points

    What I'm I missing? What is subscripting?

    Posted March 16, 2015 12:46am by Rodolfo Ocampo
    Rodolfo Ocampo
    2,663 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Monosij Bagchi
    PLUS
    Monosij Bagchi
    Courses Plus Student 2,417 Points

    Bummer! You need to create a variable called `shoppingList`.

    Posted February 27, 2015 1:02pm by Monosij Bagchi
    Monosij Bagchi
    Courses Plus Student 2,417 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • mathisvaneetvelde
    mathisvaneetvelde
    9,366 Points

    Accessing an array

    Posted February 21, 2015 5:27pm by mathisvaneetvelde
    mathisvaneetvelde
    9,366 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Kevin Mai
    Kevin Mai
    8,049 Points

    How do you use subscripting to access an element in an array?

    Posted February 4, 2015 4:33pm by Kevin Mai
    Kevin Mai
    8,049 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Barry Maloney
    Barry Maloney
    2,583 Points

    stuck on challenge 2 for data collection. the lesson used constants and functions and this is using variables.

    Posted January 22, 2015 9:02pm by Barry Maloney
    Barry Maloney
    2,583 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • True Pixels
    True Pixels
    3,178 Points

    Don't know if i am doing this right

    Posted January 4, 2015 10:03pm by True Pixels
    True Pixels
    3,178 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    1 Answer

  • Summer Carter
    Summer Carter
    794 Points

    I am trying to create the array shoppingList with the following line of code, what am I missing?

    Posted December 1, 2014 3:28pm by Summer Carter
    Summer Carter
    794 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Jacob Boykin
    Jacob Boykin
    8,424 Points

    Why is this code not acceptable?

    Posted October 9, 2014 12:51am by Jacob Boykin
    Jacob Boykin
    8,424 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Gabriel Kroll
    Gabriel Kroll
    9,823 Points

    Failure message: Oops! It looks like Task 1 is no longer passing.

    Posted September 28, 2014 6:52pm by Gabriel Kroll
    Gabriel Kroll
    9,823 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    2 Answers

  • Shelby Larson
    Shelby Larson
    33,317 Points

    Challenge 2/2 Creating a Data Collection

    Posted September 26, 2014 5:37pm by Shelby Larson
    Shelby Larson
    33,317 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Creating a Data Model
    • Creating a Data Collection

    5 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