Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Make a Constructor Challenge0:20 with Andrew Chalkley
I've a challenge for you; create your own Dice constructor function.
I've got a challenge for you.
Transform the object literal from our previous dice rolling application,
into a constructor function.
The constructor function takes in the number of sites as an argument.
Each instance you create should be able to call the method for running the base too.
Don't worry if you don't think you can do it.
Have a go, and I'll show you my solution in the next video.
You need to sign up for Treehouse in order to download course files.Sign up