🤑 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
    • 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 Basics (Retired)
    • Making Decisions with Conditional Statements
    • Document Your Code With Comments
    • Close
  • mohamedahmedgehad
    mohamedahmedgehad
    11,541 Points

    JavaScript code check

    Posted on Oct 30, 2019 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 on Jun 4, 2019 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 on Sep 20, 2018 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 on Mar 13, 2018 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 on Nov 21, 2017 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 on Nov 21, 2017 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 on Aug 23, 2017 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 on Jan 17, 2017 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 on Nov 28, 2016 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 on Aug 17, 2016 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 on Jun 21, 2016 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 on Jun 2, 2016 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 on Apr 30, 2016 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.

    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.