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.

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

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

  • 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
  • Jon Senra Dearle
    Jon Senra Dearle
    4,316 Points

    Code doesn't work against verifier but does on Xcode

    Posted March 11, 2019 7:15pm by Jon Senra Dearle
    Jon Senra Dearle
    4,316 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Carter Elgie
    Carter Elgie
    2,536 Points

    Extending a Native Type Code Challenge

    Posted December 5, 2018 2:11am by Carter Elgie
    Carter Elgie
    2,536 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    3 Answers

  • Arius Eich
    Arius Eich
    2,769 Points

    Using extensions

    Posted November 24, 2018 1:52am by Arius Eich
    Arius Eich
    2,769 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Andrii Baraniuk
    PLUS
    Andrii Baraniuk
    Courses Plus Student 3,877 Points

    Challenge doesn't accept my answer

    Posted June 4, 2018 1:26pm by Andrii Baraniuk
    Andrii Baraniuk
    Courses Plus Student 3,877 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Jesse Gay
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Jesse Gay
    Full Stack JavaScript Techdegree Student 14,045 Points

    Extending String with add func works in Xcode, but fails challenge. Why?

    Posted April 9, 2018 7:09pm by Jesse Gay
    .a{fill-rule:evenodd;}techdegree
    Jesse Gay
    Full Stack JavaScript Techdegree Student 14,045 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    2 Answers

  • Harris Ryder
    Harris Ryder
    1,333 Points

    Stuck on this task, I think Im quite close but dont quite know what its asking for, Thanks!

    Posted September 27, 2017 7:17am by Harris Ryder
    Harris Ryder
    1,333 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Kenan Bateman
    Kenan Bateman
    16,715 Points

    String Extension Challenge

    Posted September 18, 2017 11:12pm by Kenan Bateman
    Kenan Bateman
    16,715 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    2 Answers

  • Richard Sun
    Richard Sun
    11,257 Points

    Why does Treehouse say that I haven't added an add method?

    Posted July 7, 2017 8:06pm by Richard Sun
    Richard Sun
    11,257 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Zenek Barburka
    Zenek Barburka
    7,009 Points

    Expanding a native type code challange

    Posted June 29, 2017 3:28pm by Zenek Barburka
    Zenek Barburka
    7,009 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    0 Answers

  • Thomas Dobson
    Thomas Dobson
    7,511 Points

    Extensions: String and Int addition

    Posted June 14, 2017 7:19pm by Thomas Dobson
    Thomas Dobson
    7,511 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    2 Answers

  • Jose Portuondo-Dember
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Jose Portuondo-Dember
    iOS Development Techdegree Student 5,275 Points

    Help me fix this error: "Bummer! Make sure you're adding an add method that takes an Int and returns Int?"

    Posted May 15, 2017 4:08pm by Jose Portuondo-Dember
    .a{fill-rule:evenodd;}techdegree
    Jose Portuondo-Dember
    iOS Development Techdegree Student 5,275 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    2 Answers

  • Matthew Ingram
    PLUS
    Matthew Ingram
    Courses Plus Student 4,718 Points

    Adding Extensions trouble with treehouse's compiler

    Posted May 11, 2017 2:08am by Matthew Ingram
    Matthew Ingram
    Courses Plus Student 4,718 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    5 Answers

  • Stephen Zabrecky
    Stephen Zabrecky
    6,298 Points

    This works in Playgrounds but not on Treehouse

    Posted April 30, 2017 2:39am by Stephen Zabrecky
    Stephen Zabrecky
    6,298 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Chris Cynn
    Chris Cynn
    9,039 Points

    Completing Intermediate Swift 3 Extension Challenge

    Posted March 25, 2017 2:30pm by Chris Cynn
    Chris Cynn
    9,039 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Jeff McDivitt
    Jeff McDivitt
    23,970 Points

    Your task is to extend the String type and add a method that lets you add an integer value to the string. For example: "

    Posted March 2, 2017 11:31am by Jeff McDivitt
    Jeff McDivitt
    23,970 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Edwin Carrasquillo
    Edwin Carrasquillo
    10,315 Points

    A question on extending a type while typecasting to another type

    Posted February 3, 2017 3:53am by Edwin Carrasquillo
    Edwin Carrasquillo
    10,315 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

  • Richard Pitts
    PLUS
    Richard Pitts
    Courses Plus Student 1,243 Points

    What is the correct answer?

    Posted February 3, 2017 3:50am by Richard Pitts
    Richard Pitts
    Courses Plus Student 1,243 Points
    • iOS
    • Intermediate Swift
    • Extensions and Protocols
    • Extending a Native Type

    1 Answer

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