Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Creating Reusable Code with Functions Random Number Challenge, Part II

Joshua Swilling
Joshua Swilling
1,135 Points

need help new to js and community

my code wont display in the box heres a link https://teamtreehouse.com/workspaces/39541232#

Joshua Swilling
Joshua Swilling
1,135 Points

update - i got the calculations to work..but i dont get any errors for strings or NaN prompt inputs --https://teamtreehouse.com/workspaces/39541232#

Joshua Swilling
Joshua Swilling
1,135 Points

Update i got it to run!! i added the alert into the error , i discovered that the error is in the console and not a spawn to the user display, please review my code this is my 4th day at js and i am feeling really anxious and over technical

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Joshua Swilling Hi there! Unfortunately, the link you're posting to us is private to only you and temporary. When we try and go there we receive a "Bummer!" page. Instead, we will need to see what is known as a snapshot. Note: a snapshot is different than a screenshot. It allows us to fork your entire workspace and have a look around. :sparkles:

Joshua Swilling
Joshua Swilling
1,135 Points

Thank You! Jennifer Nordell , Now I am aware lol , here is my code :) -- https://w.trhou.se/40ijkxdr9s

1 Answer

Steven Parker
Steven Parker
231,236 Points

I tried your program and it appears to work very well. :+1:

The only thing I notice in the code is that normally the argument to "throw" would be a string. I don't think "alert" returns anything. So if you wanted to display a message, it would be better to call "alert" first and then "throw".