AI can only take you so far. 🌟 Start with core skills in JavaScript, HTML, CSS, or Python. 🚀

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

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

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

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • 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
  • Egor Bedunkevich
    Egor Bedunkevich
    643 Points

    Why do we need to assign a function that captures variables to a constant/variable for it to be a closure?

    Posted April 26, 2016 5:02am by Egor Bedunkevich
    Egor Bedunkevich
    643 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Closure Expression Syntax

    0 Answers

  • Austin Hawks
    PLUS
    Austin Hawks
    Courses Plus Student 3,003 Points

    When I type it in xcode, the code works, and I'm doing what the question wants, but treehouse isn't letting me pass.

    Posted April 19, 2016 8:08pm by Austin Hawks
    Austin Hawks
    Courses Plus Student 3,003 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    2 Answers

  • Cody Adkins
    Cody Adkins
    7,260 Points

    Help with my code

    Posted March 20, 2016 5:59pm by Cody Adkins
    Cody Adkins
    7,260 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    2 Answers

  • NOUR A ALGHAMDI
    PLUS
    NOUR A ALGHAMDI
    Courses Plus Student 5,607 Points

    2nd challenge :( need your help

    Posted January 24, 2016 8:13pm by NOUR A ALGHAMDI
    NOUR A ALGHAMDI
    Courses Plus Student 5,607 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    1 Answer

  • NOUR A ALGHAMDI
    PLUS
    NOUR A ALGHAMDI
    Courses Plus Student 5,607 Points

    please i need an explain and help :\

    Posted January 24, 2016 7:00pm by NOUR A ALGHAMDI
    NOUR A ALGHAMDI
    Courses Plus Student 5,607 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using the Sorted Function

    2 Answers

  • Pablo Caro
    Pablo Caro
    4,191 Points

    Can't get pass Step 1

    Posted January 12, 2016 2:15pm by Pablo Caro
    Pablo Caro
    4,191 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    2 Answers

  • Benjamin Cooper
    Benjamin Cooper
    3,162 Points

    Why does the challenge not work in actual 2.0 swift?

    Posted January 12, 2016 3:08am by Benjamin Cooper
    Benjamin Cooper
    3,162 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • More Closure Shorthand

    3 Answers

  • villa
    villa
    6,171 Points

    Help i don't know what i doing wrong

    Posted December 5, 2015 1:57am by villa
    villa
    6,171 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    0 Answers

  • Brendan Whiting
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Brendan Whiting
    Front End Web Development Techdegree Graduate 84,738 Points

    What's the logic behind the keyword "in" in closure expression syntax?

    Posted December 3, 2015 8:26pm by Brendan Whiting
    .a{fill-rule:evenodd;}techdegree seal-36
    Brendan Whiting
    Front End Web Development Techdegree Graduate 84,738 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using the Sorted Function

    3 Answers

  • qasimalbaqali
    qasimalbaqali
    17,839 Points

    Using Filter challenge [Closuers]

    Posted October 30, 2015 2:53pm by qasimalbaqali
    qasimalbaqali
    17,839 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    1 Answer

  • Antonija Pek
    Antonija Pek
    5,819 Points

    How bad did I miss the result?

    Posted September 5, 2015 4:18pm by Antonija Pek
    Antonija Pek
    5,819 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    2 Answers

  • Bruce G
    Bruce G
    5,360 Points

    What is numbers for?

    Posted August 21, 2015 9:22am by Bruce G
    Bruce G
    5,360 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    1 Answer

  • David Bauer
    David Bauer
    3,863 Points

    Using the Sorted Function gives an error

    Posted August 13, 2015 6:25pm by David Bauer
    David Bauer
    3,863 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using the Sorted Function

    2 Answers

  • kevin11
    kevin11
    2,535 Points

    Swift Closure Challenge?

    Posted July 20, 2015 1:47pm by kevin11
    kevin11
    2,535 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    1 Answer

  • Jeremy Powell
    Jeremy Powell
    2,420 Points

    Swift Closures: Using Filter challenge task 1 of 2 is wrong how?

    Posted July 15, 2015 2:39am by Jeremy Powell
    Jeremy Powell
    2,420 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    2 Answers

  • Will Matthews
    Will Matthews
    8,127 Points

    Why doesn't my isOdd function pass the test?

    Posted July 10, 2015 10:30am by Will Matthews
    Will Matthews
    8,127 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    2 Answers

  • Roland Shen
    Roland Shen
    7,628 Points

    Why assign a function to a variable?

    Posted July 8, 2015 10:19pm by Roland Shen
    Roland Shen
    7,628 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Closure Expression Syntax

    1 Answer

  • Zubeyr Aciksari
    Zubeyr Aciksari
    21,074 Points

    Define a function, named isOdd, to check if a number is odd. The function takes a number and returns either true or fals

    Posted June 14, 2015 6:58pm by Zubeyr Aciksari
    Zubeyr Aciksari
    21,074 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    1 Answer

  • Matt Frerichs
    Matt Frerichs
    4,015 Points

    Need help creating oddNumbers array in closures challenge.

    Posted June 5, 2015 6:54pm by Matt Frerichs
    Matt Frerichs
    4,015 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    3 Answers

  • Beth Knight
    Beth Knight
    4,244 Points

    Beating the odds

    Posted June 4, 2015 8:31pm by Beth Knight
    Beth Knight
    4,244 Points
    • iOS
    • Swift Closures
    • Closures and Closure Expressions
    • Using Filter

    2 Answers

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

    Treehouse

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

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.