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
  • Leo Marco Corpuz
    Leo Marco Corpuz
    18,975 Points

    Code written exactly like in the video and it still doesn't work?

    Posted March 2, 2018 1:38am by Leo Marco Corpuz
    Leo Marco Corpuz
    18,975 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    1 Answer

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

    Why can't we use arrow functions when defining the constructor function?

    Posted December 28, 2017 5:17am by David Avila
    .a{fill-rule:evenodd;}techdegree
    David Avila
    Full Stack JavaScript Techdegree Student 5,410 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    1 Answer

  • ammarkhan
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points

    Unable to solve the challenge.

    Posted May 27, 2017 1:22pm by ammarkhan
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    5 Answers

  • Kevin Lassar
    Kevin Lassar
    22,440 Points

    My Solution for this challenge...

    Posted May 17, 2017 9:28pm by Kevin Lassar
    Kevin Lassar
    22,440 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    2 Answers

  • nicholas maddren
    nicholas maddren
    12,793 Points

    Why did Andrew use this.sides?

    Posted April 28, 2017 9:44am by nicholas maddren
    nicholas maddren
    12,793 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    3 Answers

  • Andrew Alvarez
    Andrew Alvarez
    7,286 Points

    Is the variable "randomNumber" inside of the method function necessary?

    Posted March 26, 2017 9:18pm by Andrew Alvarez
    Andrew Alvarez
    7,286 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    1 Answer

  • Leon Segal
    Leon Segal
    14,754 Points

    that...or this? **Spoiler Alert** (Solution is discussed here)

    Posted August 7, 2016 5:25pm by Leon Segal
    Leon Segal
    14,754 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    3 Answers

  • Rahul Nayak
    Rahul Nayak
    863 Points

    the code not working for creating a constructor

    Posted May 22, 2016 6:30am by Rahul Nayak
    Rahul Nayak
    863 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    5 Answers

  • Rich P
    Rich P
    2,356 Points

    Does This Still Work?

    Posted January 26, 2016 4:56am by Rich P
    Rich P
    2,356 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    3 Answers

  • Francis N
    Francis N
    10,376 Points

    Getting [object Object] after click 'Roll Dice'

    Posted January 22, 2016 11:56pm by Francis N
    Francis N
    10,376 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    2 Answers

  • Cuciureanu Dragos
    Cuciureanu Dragos
    5,916 Points

    Why we create 2 dice , dice(6) and dice(10)?

    Posted December 15, 2015 6:09pm by Cuciureanu Dragos
    Cuciureanu Dragos
    5,916 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    1 Answer

  • Nicolas Filzi
    Nicolas Filzi
    18,021 Points

    Why is "this" in "this.sides" necessary in the randomNumber construction this time?

    Posted August 15, 2015 9:29pm by Nicolas Filzi
    Nicolas Filzi
    18,021 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    2 Answers

  • David Karlsson
    David Karlsson
    4,180 Points

    this.sides = sides?

    Posted August 2, 2015 12:42pm by David Karlsson
    David Karlsson
    4,180 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    2 Answers

  • Prakhar Patwa
    Prakhar Patwa
    11,260 Points

    i have some problem with that challenge.

    Posted July 8, 2015 4:57am by Prakhar Patwa
    Prakhar Patwa
    11,260 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    2 Answers

  • Yohanan Braun-Feder
    Yohanan Braun-Feder
    6,101 Points

    I achieved the same result but longer code... the example given does not work.

    Posted July 2, 2015 8:58pm by Yohanan Braun-Feder
    Yohanan Braun-Feder
    6,101 Points
    • JavaScript
    • Object-Oriented JavaScript (2015)
    • Constructor Functions and Prototypes
    • Challenge Solution

    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