Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • johan suh
    johan suh
    4,157 Points

    bonus challenge question

    Posted June 8, 2020 4:16pm by johan suh
    johan suh
    4,157 Points
    • JavaScript
    • The Solution

    1 Answer

  • Dana Seidakhmetova
    Dana Seidakhmetova
    10,956 Points

    bonus challenge question

    Posted June 1, 2020 4:16am by Dana Seidakhmetova
    Dana Seidakhmetova
    10,956 Points
    • JavaScript
    • The Solution

    1 Answer

  • Carl Orre
    Carl Orre
    5,566 Points

    Difference between <5 and <=4

    Posted March 13, 2020 6:27pm by Carl Orre
    Carl Orre
    5,566 Points
    • JavaScript
    • The Solution

    1 Answer

  • Stheven Cabral
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Stheven Cabral
    Full Stack JavaScript Techdegree Graduate 29,854 Points

    Why write 'node' in the console?

    Posted January 29, 2020 4:35pm by Stheven Cabral
    .a{fill-rule:evenodd;}techdegree seal-36
    Stheven Cabral
    Full Stack JavaScript Techdegree Graduate 29,854 Points
    • JavaScript
    • The Solution

    2 Answers

  • Rodrigo Bahiense
    Rodrigo Bahiense
    8,211 Points

    I solved using function

    Posted December 3, 2019 12:57pm by Rodrigo Bahiense
    Rodrigo Bahiense
    8,211 Points
    • JavaScript
    • The Solution

    2 Answers

  • Daniel Grigo
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Daniel Grigo
    Full Stack JavaScript Techdegree Graduate 18,815 Points

    Shorter way to write the while loop...?

    Posted November 1, 2019 9:38am by Daniel Grigo
    .a{fill-rule:evenodd;}techdegree seal-36
    Daniel Grigo
    Full Stack JavaScript Techdegree Graduate 18,815 Points
    • JavaScript
    • The Solution

    1 Answer

  • Diego Alvarez
    Diego Alvarez
    6,680 Points

    What's the logic of this syntax for '8' to be printed at the end?

    Posted October 30, 2019 4:16pm by Diego Alvarez
    Diego Alvarez
    6,680 Points
    • JavaScript
    • The Solution

    2 Answers

  • Yasir alabadi
    Yasir alabadi
    5,744 Points

    I don't get whats going on here, keep getting errors

    Posted September 27, 2019 11:04am by Yasir alabadi
    Yasir alabadi
    5,744 Points
    • JavaScript
    • The Solution

    1 Answer

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

    Bonus Question: Uncaught TypeError: Assignment to constant variable.

    Posted August 28, 2019 7:24pm by professionalb
    .a{fill-rule:evenodd;}techdegree
    professionalb
    Full Stack JavaScript Techdegree Student 5,082 Points
    • JavaScript
    • The Solution

    1 Answer

  • Muhammad Jalabi
    Muhammad Jalabi
    6,782 Points

    whileLoops error not making me wiser

    Posted July 31, 2019 9:08pm by Muhammad Jalabi
    Muhammad Jalabi
    6,782 Points
    • JavaScript
    • The Solution

    1 Answer

  • Wilson Parks
    Wilson Parks
    3,813 Points

    For the doWhileLoops solution demonstration, Is there a reason that there were no semi-colons in the solutions?...

    Posted June 19, 2019 11:57pm by Wilson Parks
    Wilson Parks
    3,813 Points
    • JavaScript
    • The Solution

    2 Answers

  • Stacey Auguste
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Stacey Auguste
    Full Stack JavaScript Techdegree Student 1,566 Points

    Solved the whileLoops bonus question in a different way. Is this still considered good code?

    Posted June 14, 2019 9:57pm by Stacey Auguste
    .a{fill-rule:evenodd;}techdegree
    Stacey Auguste
    Full Stack JavaScript Techdegree Student 1,566 Points
    • JavaScript
    • The Solution

    1 Answer

  • Anna Astle
    Anna Astle
    13,614 Points

    Working on while loop practice. Not sure why code isn't working correctly

    Posted March 28, 2019 8:15pm by Anna Astle
    Anna Astle
    13,614 Points
    • JavaScript
    • The Solution

    1 Answer

  • pikktorr
    pikktorr
    6,606 Points

    BONUS CHALLENGE in forLoops.js. Is it possible to get the exact same solution?

    Posted March 4, 2019 2:35pm by pikktorr
    pikktorr
    6,606 Points
    • JavaScript
    • The Solution

    3 Answers

  • adrian garcia
    adrian garcia
    4,658 Points

    whileLoops.js

    Posted January 29, 2019 11:31am by adrian garcia
    adrian garcia
    4,658 Points
    • JavaScript
    • The Solution

    1 Answer

  • Russell Smitheram
    Russell Smitheram
    2,009 Points

    My code keeps hanging...

    Posted November 29, 2018 6:24pm by Russell Smitheram
    Russell Smitheram
    2,009 Points
    • JavaScript
    • The Solution

    1 Answer

  • Christopher Harrison
    Christopher Harrison
    4,964 Points

    Can't use a for loop to generate random num between 0 and 9 until getting 8?

    Posted October 18, 2018 7:46pm by Christopher Harrison
    Christopher Harrison
    4,964 Points
    • JavaScript
    • The Solution

    3 Answers

  • Nour El-din El-helw
    Nour El-din El-helw
    8,241 Points

    Loop 5 Killed

    Posted June 9, 2018 6:34pm by Nour El-din El-helw
    Nour El-din El-helw
    8,241 Points
    • JavaScript
    • The Solution

    1 Answer

  • Jong Kim
    Jong Kim
    6,145 Points

    Why do we need a bracket even though we have parenthesis?

    Posted March 21, 2018 8:35pm by Jong Kim
    Jong Kim
    6,145 Points
    • JavaScript
    • The Solution

    1 Answer

  • Steve Gallant
    Steve Gallant
    14,943 Points

    Slightly DRYer, but any caveats?

    Posted December 31, 2017 6:22pm by Steve Gallant
    Steve Gallant
    14,943 Points
    • JavaScript
    • The Solution

    1 Answer

  • paulscanlon
    PLUS
    paulscanlon
    Courses Plus Student 26,735 Points

    Question about loops

    Posted October 15, 2017 2:26pm by paulscanlon
    paulscanlon
    Courses Plus Student 26,735 Points
    • JavaScript
    • The Solution

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord