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

New No-Code Track! 🚀 New videos dropping every week—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
    • Community Projects
    • Live Sessions
    • 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
  • Community Projects Live Sessions 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
  • Sean ó Conchobhair
    Sean ó Conchobhair
    2,695 Points

    Error message is incorrect on this test.

    Posted January 23, 2024 7:44am by Sean ó Conchobhair
    Sean ó Conchobhair
    2,695 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Times

    1 Answer

  • Unsubscribed User
    Unsubscribed User
    1,266 Points

    does ruby ignore updates to index because its not in the why condition? is index updated and not referenced?

    Posted October 16, 2019 6:40am by Unsubscribed User
    Unsubscribed User
    1,266 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Each

    1 Answer

  • Monroe Mann
    Monroe Mann
    3,273 Points

    Stuck on Ruby for loop. Why won't this run?

    Posted November 25, 2018 12:39am by Monroe Mann
    Monroe Mann
    3,273 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • The For Loop

    4 Answers

  • Osman Ercanli
    Osman Ercanli
    3,579 Points

    help with forloop syntax error

    Posted January 18, 2018 2:07pm by Osman Ercanli
    Osman Ercanli
    3,579 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • For Loops

    2 Answers

  • Osman Ercanli
    Osman Ercanli
    3,579 Points

    help with forloop syntax error

    Posted January 18, 2018 2:07pm by Osman Ercanli
    Osman Ercanli
    3,579 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • For Loops

    2 Answers

  • Thomas Minnick
    Thomas Minnick
    2,539 Points

    whats the difference between what Jason has in the video and this code?

    Posted August 15, 2017 7:32pm by Thomas Minnick
    Thomas Minnick
    2,539 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Each

    1 Answer

  • Eylon Cohen
    Eylon Cohen
    4,779 Points

    Quick Question about loops and iterations

    Posted November 13, 2016 9:35am by Eylon Cohen
    Eylon Cohen
    4,779 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Each

    1 Answer

  • aronlilland
    aronlilland
    8,951 Points

    how would I iterate and return all of the array items within the hash?

    Posted February 15, 2016 2:41am by aronlilland
    aronlilland
    8,951 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Hash Iteration

    2 Answers

  • Jitendra Bansal
    Jitendra Bansal
    9,805 Points

    The 'for' loop was not used

    Posted October 22, 2015 3:30am by Jitendra Bansal
    Jitendra Bansal
    9,805 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • The For Loop

    1 Answer

  • Andrew Walters
    Andrew Walters
    8,876 Points

    What are the benefits to Iterations with Each compared to (while) loops?

    Posted September 18, 2015 7:20pm by Andrew Walters
    Andrew Walters
    8,876 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Each

    1 Answer

  • Andrew Alvarez
    Andrew Alvarez
    11,964 Points

    Ideration with Times

    Posted September 14, 2015 10:01pm by Andrew Alvarez
    Andrew Alvarez
    11,964 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Times

    1 Answer

  • Mark Weinberg
    Mark Weinberg
    3,002 Points

    How does Ruby know from the word "item" in the pipe to print out "Hello!" and then the numbers 0 to 5?

    Posted August 5, 2015 10:15pm by Mark Weinberg
    Mark Weinberg
    3,002 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Times Iteration

    2 Answers

  • David Besserman
    David Besserman
    3,963 Points

    Please, can you give more explantions on the role of the argument in the each method ?

    Posted June 28, 2015 9:30am by David Besserman
    David Besserman
    3,963 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Each

    2 Answers

  • Hyunsoo Choi
    Hyunsoo Choi
    1,255 Points

    How did the variable |item| printed out number from 0 to 4?

    Posted June 16, 2015 12:49am by Hyunsoo Choi
    Hyunsoo Choi
    1,255 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Times Iteration

    3 Answers

  • Edward Torres
    Edward Torres
    6,158 Points

    What is wrong with my code.

    Posted May 31, 2015 8:09pm by Edward Torres
    Edward Torres
    6,158 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Each

    1 Answer

  • Sara Brothers
    Sara Brothers
    7,341 Points

    for loop in Ruby

    Posted May 25, 2015 4:45pm by Sara Brothers
    Sara Brothers
    7,341 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • The For Loop

    1 Answer

  • Gareth Powell
    PLUS
    Gareth Powell
    Courses Plus Student 7,016 Points

    Help on challenge "Use a for loop to print each item in the animals array to the screen using the puts method."

    Posted May 24, 2015 10:41pm by Gareth Powell
    Gareth Powell
    Courses Plus Student 7,016 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • The For Loop

    4 Answers

  • Kerem Kazan
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Kerem Kazan
    Full Stack JavaScript Techdegree Student 5,280 Points

    for loop not running

    Posted May 14, 2015 7:38am by Kerem Kazan
    .a{fill-rule:evenodd;}techdegree
    Kerem Kazan
    Full Stack JavaScript Techdegree Student 5,280 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • The For Loop

    1 Answer

  • Sebastian Giliberto
    Sebastian Giliberto
    1,809 Points

    Using the each method, iterate over every item in the contact hash and print the key and value using the puts method.

    Posted March 16, 2015 5:15pm by Sebastian Giliberto
    Sebastian Giliberto
    1,809 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Hash Iteration

    2 Answers

  • ALISA FORAN
    ALISA FORAN
    11,961 Points

    Using the each method, iterate over every item in the numbers array and print using the puts method

    Posted February 13, 2015 3:08am by ALISA FORAN
    ALISA FORAN
    11,961 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Iteration With Each

    2 Answers

  • Sam Fitz
    Sam Fitz
    7,036 Points

    The Distinction Between For Loops and Other Kinds of Loops

    Posted December 14, 2014 12:09pm by Sam Fitz
    Sam Fitz
    7,036 Points
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • For Loops

    6 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.