🤑 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
  • nydia subur
    nydia subur
    1,672 Points

    .self and init

    Posted June 3, 2016 6:28am by nydia subur
    nydia subur
    1,672 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    1 Answer

  • RAJ PATEL
    RAJ PATEL
    4,282 Points

    Can you help me explain "self" and init() method again?

    Posted March 1, 2016 8:08am by RAJ PATEL
    RAJ PATEL
    4,282 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    1 Answer

  • Josh Schlabach
    Josh Schlabach
    1,771 Points

    Why are initializers used?

    Posted June 10, 2015 7:34pm by Josh Schlabach
    Josh Schlabach
    1,771 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    2 Answers

  • Josh Schlabach
    Josh Schlabach
    1,771 Points

    What does "self " do in my code?

    Posted June 6, 2015 1:00am by Josh Schlabach
    Josh Schlabach
    1,771 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    3 Answers

  • Anthony Albertorio
    Anthony Albertorio
    22,624 Points

    What's the difference between a default value and an initial value in a Struct?

    Posted May 16, 2015 4:36pm by Anthony Albertorio
    Anthony Albertorio
    22,624 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    0 Answers

  • Samar Khanna
    Samar Khanna
    1,757 Points

    Why do i need to pass in two arguments in the init method when that was already being done earlier?

    Posted April 23, 2015 12:00pm by Samar Khanna
    Samar Khanna
    1,757 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    1 Answer

  • oyemayowa sanwo
    oyemayowa sanwo
    861 Points

    Concise study material or restart whole course

    Posted April 12, 2015 1:03pm by oyemayowa sanwo
    oyemayowa sanwo
    861 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    1 Answer

  • Sreenivasa Madenahally
    Sreenivasa Madenahally
    1,072 Points

    How can i change the value of type when I am declaring the struct contacts?

    Posted April 9, 2015 6:53pm by Sreenivasa Madenahally
    Sreenivasa Madenahally
    1,072 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    1 Answer

  • wajid abid
    PLUS
    wajid abid
    Courses Plus Student 1,803 Points

    in previous lesson why you make the first two attribute as a constant?

    Posted February 18, 2015 1:47pm by wajid abid
    wajid abid
    Courses Plus Student 1,803 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    1 Answer

  • Zhen Zhi Yeo
    PLUS
    Zhen Zhi Yeo
    Courses Plus Student 2,685 Points

    Does init behaves like constructor overloading in java?

    Posted December 30, 2014 2:40pm by Zhen Zhi Yeo
    Zhen Zhi Yeo
    Courses Plus Student 2,685 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    0 Answers

  • Kantanand US
    Kantanand US
    2,037 Points

    Where the Structs are used in application in realtime example ?

    Posted November 12, 2014 12:17pm by Kantanand US
    Kantanand US
    2,037 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    2 Answers

  • Kevin Lozandier
    PLUS
    Kevin Lozandier
    Courses Plus Student 53,747 Points

    Why named parameters aren't used when overriding swift struct initializers?

    Posted November 12, 2014 6:32am by Kevin Lozandier
    Kevin Lozandier
    Courses Plus Student 53,747 Points
    • iOS
    • Swift Enums and Structs
    • Structs and their Methods
    • Initializers

    1 Answer

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.