✨ 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:
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Simplify Repetitive Tasks with Loops
    • Exiting Loops
    • Close
  • francisobrien
    francisobrien
    2,131 Points

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

    Posted on Apr 2, 2020 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 on Nov 16, 2018 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 on Oct 23, 2018 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 on Feb 28, 2018 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 on Jan 17, 2018 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 on Sep 1, 2017 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 on Sep 1, 2017 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 on Aug 30, 2017 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 on Aug 23, 2017 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 on Jun 30, 2017 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 on Jun 15, 2017 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 on Jun 13, 2017 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 on Apr 27, 2017 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 on Apr 17, 2017 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 on Mar 4, 2017 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 on Feb 14, 2017 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 on May 28, 2016 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 on May 9, 2016 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 on Nov 1, 2015 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 on Jul 28, 2015 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 on Jul 19, 2015 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 on Jun 3, 2015 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 on May 28, 2015 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 on May 2, 2015 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 on Apr 30, 2015 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 on Apr 20, 2015 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 on Feb 18, 2015 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.