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.

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

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

  • 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
  • Gal Parselany
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Gal Parselany
    Full Stack JavaScript Techdegree Graduate 26,281 Points

    I did it another way, is that ok? or I have some bug that I dont see yet :

    Posted February 14, 2023 6:50pm by Gal Parselany
    .a{fill-rule:evenodd;}techdegree seal-36
    Gal Parselany
    Full Stack JavaScript Techdegree Graduate 26,281 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    1 Answer

  • Dennis Trinidad
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Dennis Trinidad
    Full Stack JavaScript Techdegree Student 759 Points

    Not showing after preview

    Posted December 21, 2022 12:33pm by Dennis Trinidad
    .a{fill-rule:evenodd;}techdegree
    Dennis Trinidad
    Full Stack JavaScript Techdegree Student 759 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    1 Answer

  • Shin Ting Lin
    Shin Ting Lin
    4,906 Points

    Why const main could be reassign?

    Posted July 25, 2022 10:45am by Shin Ting Lin
    Shin Ting Lin
    4,906 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    1 Answer

  • Nik Oaks
    Nik Oaks
    8,056 Points

    Exponential growth in loops

    Posted June 14, 2022 4:20pm by Nik Oaks
    Nik Oaks
    8,056 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    1 Answer

  • Geovani Mejia
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Geovani Mejia
    Front End Web Development Techdegree Student 7,940 Points

    What code is creating the circles and how?

    Posted March 28, 2022 11:02pm by Geovani Mejia
    .a{fill-rule:evenodd;}techdegree
    Geovani Mejia
    Front End Web Development Techdegree Student 7,940 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    1 Answer

  • Spencer Renfro
    PLUS
    Spencer Renfro
    Courses Plus Student 11,133 Points

    Explanation of inner.HTML

    Posted March 17, 2022 3:53pm by Spencer Renfro
    Spencer Renfro
    Courses Plus Student 11,133 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    1 Answer

  • Carmen Chow
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Carmen Chow
    Full Stack JavaScript Techdegree Student 578 Points

    Why does ${i} display instead of numbers in the circle divs?

    Posted October 3, 2021 12:44am by Carmen Chow
    .a{fill-rule:evenodd;}techdegree
    Carmen Chow
    Full Stack JavaScript Techdegree Student 578 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    2 Answers

  • ja5on
    ja5on
    10,339 Points

    loop inside a function?

    Posted September 14, 2021 6:55pm by ja5on
    ja5on
    10,339 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    2 Answers

  • Chun Wang
    Chun Wang
    1,740 Points

    html += `<div>${i}</div> logic behind +=?

    Posted April 9, 2021 2:37pm by Chun Wang
    Chun Wang
    1,740 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    2 Answers

  • Anh Tran
    Anh Tran
    2,556 Points

    Cannot set property 'innerHTM' of Null

    Posted October 29, 2020 9:13am by Anh Tran
    Anh Tran
    2,556 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    2 Answers

  • Jonathon Pope
    Jonathon Pope
    9,930 Points

    changing html outside of the loop

    Posted July 6, 2020 11:54pm by Jonathon Pope
    Jonathon Pope
    9,930 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    2 Answers

  • Nikita Tsigelberg
    Nikita Tsigelberg
    2,625 Points

    Getting weird output in browser

    Posted June 23, 2020 1:00am by Nikita Tsigelberg
    Nikita Tsigelberg
    2,625 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    4 Answers

  • Tadjiev Codes
    Tadjiev Codes
    9,626 Points

    Thanks for this amazing Loops course) Love it

    Posted June 21, 2020 1:20am by Tadjiev Codes
    Tadjiev Codes
    9,626 Points
    • JavaScript
    • JavaScript Loops
    • Working with 'for' Loops
    • Dynamically Display HTML with a Loop

    2 Answers

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