✨ Earn college credits in Cybersecurity, JS, HTML, CSS and 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

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

  • 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
    • Showing results for:
    • Ruby
    • Ruby Loops
    • Ruby Iteration
    • Close
  • Sean ó Conchobhair
    Sean ó Conchobhair
    2,695 Points

    Error message is incorrect on this test.

    Posted on Jan 23, 2024 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 on Oct 16, 2019 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 on Nov 25, 2018 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 on Jan 18, 2018 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 on Jan 18, 2018 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 on Aug 15, 2017 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 on Nov 13, 2016 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 on Feb 15, 2016 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 on Oct 22, 2015 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 on Sep 18, 2015 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 on Sep 14, 2015 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 on Aug 5, 2015 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 on Jun 28, 2015 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 on Jun 16, 2015 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 on May 31, 2015 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 on May 25, 2015 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 on May 24, 2015 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 on May 14, 2015 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 on Mar 16, 2015 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 on Feb 13, 2015 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 on Dec 14, 2014 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.