Skip to main content

Notice: Workspaces are undergoing maintenance and are temporarily unavailable.

🚀 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
  • mohamedahmedgehad
    mohamedahmedgehad
    11,541 Points

    JavaScript code check

    Posted October 30, 2019 2:18pm by mohamedahmedgehad
    mohamedahmedgehad
    11,541 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    1 Answer

  • vamosrope14
    vamosrope14
    14,932 Points

    Would having correctGuess=True written out twice count as reptitive code?

    Posted June 4, 2019 10:05pm by vamosrope14
    vamosrope14
    14,932 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    2 Answers

  • Fanny Villarosa
    Fanny Villarosa
    2,026 Points

    random number generator

    Posted September 20, 2018 9:00am by Fanny Villarosa
    Fanny Villarosa
    2,026 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    5 Answers

  • Jong Kim
    Jong Kim
    6,145 Points

    How do we find where the error exactly happened after i opened console?

    Posted March 13, 2018 10:06pm by Jong Kim
    Jong Kim
    6,145 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    1 Answer

  • Leroy Sharp
    Leroy Sharp
    2,711 Points

    Is the last conditional statement incorrect?

    Posted November 21, 2017 10:50pm by Leroy Sharp
    Leroy Sharp
    2,711 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    1 Answer

  • Francesco Nasso
    Francesco Nasso
    5,427 Points

    // Comments vs /* */ Comments

    Posted November 21, 2017 12:11am by Francesco Nasso
    Francesco Nasso
    5,427 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    1 Answer

  • Owais Ul Haq
    Owais Ul Haq
    2,020 Points

    Random number program

    Posted August 23, 2017 5:51am by Owais Ul Haq
    Owais Ul Haq
    2,020 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    1 Answer

  • Paula Mourad
    Paula Mourad
    5,154 Points

    Styling JS

    Posted January 17, 2017 8:44pm by Paula Mourad
    Paula Mourad
    5,154 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    3 Answers

  • Christopher Sea
    Christopher Sea
    3,726 Points

    Another way to write a comment.

    Posted November 28, 2016 12:40am by Christopher Sea
    Christopher Sea
    3,726 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    1 Answer

  • MICHAEL P
    MICHAEL P
    5,191 Points

    In order to have proper syntax in JavaScript, when commenting do you always begin line with // ?

    Posted August 17, 2016 1:58am by MICHAEL P
    MICHAEL P
    5,191 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    4 Answers

  • Sebastian Eguez
    Sebastian Eguez
    8,248 Points

    Why do you start with var correctGuess = false; ?

    Posted June 21, 2016 1:31pm by Sebastian Eguez
    Sebastian Eguez
    8,248 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    5 Answers

  • Paul M
    Paul M
    16,370 Points

    Why did the code only put if (correctAnswer) instead of, if (correctAnswer = true) ?

    Posted June 2, 2016 8:56pm by Paul M
    Paul M
    16,370 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    4 Answers

  • Chetan K
    PLUS
    Chetan K
    Courses Plus Student 6,677 Points

    The comment sequence does not match the code sequence for the following comment.1) Correct 2) too high 3) Too low

    Posted April 30, 2016 3:52pm by Chetan K
    Chetan K
    Courses Plus Student 6,677 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments

    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