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
smriti chawla
2,566 PointsWhy is my throw statement not working?
Here is my workspace:
While my code overall is running fine, I see an error in the console for my throw statement. What am I doing wrong?
2 Answers
Alexander Davison
65,469 PointsIs that the error the throw method throws?
Your code is working fine. Remember that throw literally makes an error. You should be seeing an error if the line of code is executed.
I hope this helps
Happy coding!
~Alex
jason chan
31,009 Pointsthrow is error statement.
Make an error in your code and it will throw.