🤑 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
    • 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
  • francisobrien
    francisobrien
    2,131 Points

    while (true) - I don't get using a boolean as a condition... confused!

    Posted April 2, 2020 8:59am by francisobrien
    francisobrien
    2,131 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    6 Answers

  • Brian Prouty
    Brian Prouty
    1,792 Points

    Why is the if (correctGuess) at the end is equal to true?

    Posted November 16, 2018 6:58pm by Brian Prouty
    Brian Prouty
    1,792 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    3 Answers

  • Nick Evershed
    Nick Evershed
    6,429 Points

    IM STUCK

    Posted October 23, 2018 3:57pm by Nick Evershed
    Nick Evershed
    6,429 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    2 Answers

  • Walter Rivas
    PLUS
    Walter Rivas
    Courses Plus Student 3,894 Points

    Could you guys tell me if this is rigth? , im not using Break, just practicing differents ways to do the "Do-While"

    Posted February 28, 2018 1:32pm by Walter Rivas
    Walter Rivas
    Courses Plus Student 3,894 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Billie Barnett
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Billie Barnett
    UX Design Techdegree Graduate 17,463 Points

    Code does not run

    Posted January 17, 2018 12:41am by Billie Barnett
    .a{fill-rule:evenodd;}techdegree seal-36
    Billie Barnett
    UX Design Techdegree Graduate 17,463 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Landon Wiedenman
    Landon Wiedenman
    5,629 Points

    Downloadable project files do not match videos, at all. Thought you should know.

    Posted September 1, 2017 3:47pm by Landon Wiedenman
    Landon Wiedenman
    5,629 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Sal Sal
    Sal Sal
    47 Points

    In the If at the end.Why do we not add correctGuess= true.?

    Posted September 1, 2017 11:51am by Sal Sal
    Sal Sal
    47 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    4 Answers

  • Owais Ul Haq
    Owais Ul Haq
    2,020 Points

    do while loop

    Posted August 30, 2017 9:21pm by Owais Ul Haq
    Owais Ul Haq
    2,020 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    3 Answers

  • armand Rodriguez
    armand Rodriguez
    7,830 Points

    Quiz Answer

    Posted August 23, 2017 11:59pm by armand Rodriguez
    armand Rodriguez
    7,830 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    2 Answers

  • Unsubscribed User
    Unsubscribed User
    4,479 Points

    'Not' operator confusion

    Posted June 30, 2017 11:42pm by Unsubscribed User
    Unsubscribed User
    4,479 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    3 Answers

  • Andrea Boscolo
    Andrea Boscolo
    7,250 Points

    In the IF at the end why I don't need do specify correctGuess === true;?

    Posted June 15, 2017 9:32am by Andrea Boscolo
    Andrea Boscolo
    7,250 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    2 Answers

  • Marcos Raj
    PLUS
    Marcos Raj
    Courses Plus Student 5,979 Points

    What is the use of Break, when you are increment the value of guessCount?

    Posted June 13, 2017 11:51pm by Marcos Raj
    Marcos Raj
    Courses Plus Student 5,979 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Jordan C
    Jordan C
    6,249 Points

    What are examples of when you would use a for, while, and do while loop?

    Posted April 27, 2017 2:22am by Jordan C
    Jordan C
    6,249 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Learning coding
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Learning coding
    Front End Web Development Techdegree Student 9,937 Points

    Can someone give more explanation why there is an infinite loop at 1.38?

    Posted April 17, 2017 10:21am by Learning coding
    .a{fill-rule:evenodd;}techdegree
    Learning coding
    Front End Web Development Techdegree Student 9,937 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    2 Answers

  • Fuad Muhammad
    Fuad Muhammad
    4,273 Points

    What is mean "(! correctGuess)" on the do..while loop?

    Posted March 4, 2017 8:53am by Fuad Muhammad
    Fuad Muhammad
    4,273 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Debra Swersky
    Debra Swersky
    3,352 Points

    This video isn't playing.

    Posted February 14, 2017 6:06pm by Debra Swersky
    Debra Swersky
    3,352 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Ian Hock
    Ian Hock
    7,604 Points

    I was wondering why we create an empty variable called guess; ? I've erased it and the program still functions?!

    Posted May 28, 2016 10:03pm by Ian Hock
    Ian Hock
    7,604 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    3 Answers

  • Tyrel Kessinger
    Tyrel Kessinger
    8,414 Points

    Absolutely Cannot Get Code to Run

    Posted May 9, 2016 2:24pm by Tyrel Kessinger
    Tyrel Kessinger
    8,414 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    6 Answers

  • Christopher Mlalazi
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Christopher Mlalazi
    Front End Web Development Techdegree Graduate 17,305 Points

    How Will I Remember All These Loops?

    Posted November 1, 2015 10:46pm by Christopher Mlalazi
    .a{fill-rule:evenodd;}techdegree seal-36
    Christopher Mlalazi
    Front End Web Development Techdegree Graduate 17,305 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    8 Answers

  • Jozef Banuelos
    Jozef Banuelos
    8,377 Points

    I'm using Adobe Brackets and the guess count goes past 10 without breaking.

    Posted July 28, 2015 4:52pm by Jozef Banuelos
    Jozef Banuelos
    8,377 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    0 Answers

  • Nicolas Queen
    Nicolas Queen
    7,331 Points

    The script continues past 10 despite the while loop having guessCount < 10. Help?

    Posted July 19, 2015 7:33pm by Nicolas Queen
    Nicolas Queen
    7,331 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    0 Answers

  • Aaron Coursolle
    Aaron Coursolle
    18,014 Points

    Where is the error?

    Posted June 3, 2015 3:04pm by Aaron Coursolle
    Aaron Coursolle
    18,014 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    2 Answers

  • Kevin Sulonen
    PLUS
    Kevin Sulonen
    Courses Plus Student 12,856 Points

    You might consider commenting out the do...while loop in script.js so that it doesn't run when first opening the preview

    Posted May 28, 2015 9:40pm by Kevin Sulonen
    Kevin Sulonen
    Courses Plus Student 12,856 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    0 Answers

  • nick88p
    nick88p
    5,716 Points

    For loop - Code took too long to run

    Posted May 2, 2015 2:02pm by nick88p
    nick88p
    5,716 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    2 Answers

  • Kayode Olaleye
    Kayode Olaleye
    4,078 Points

    The while(true) {...} function

    Posted April 30, 2015 10:26am by Kayode Olaleye
    Kayode Olaleye
    4,078 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    3 Answers

  • Jason Chiu
    Jason Chiu
    4,373 Points

    The randomNumber variable does not declare first in this video.

    Posted April 20, 2015 4:17pm by Jason Chiu
    Jason Chiu
    4,373 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    1 Answer

  • Phil Ellett
    Phil Ellett
    20,514 Points

    You use the increment operator i++; in one of the questions without using or explaining it beforehand.

    Posted February 18, 2015 4:09pm by Phil Ellett
    Phil Ellett
    20,514 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops

    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.