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 Loops Working with 'for' Loops Exit a Loop

Eddie Boscana
Eddie Boscana
6,882 Points

Applying this lesson: Building a JavaScript Game

Hello Team Treehouse Community!

I'm thrilled to share a project that sprang from what I've learned in our training. It's an interactive "Secret Word Guessing Game" that showcases practical JavaScript applications, particularly focusing on loop control and the break statement.

This project was a wonderful chance for me to bring the concepts we've been studying to life in a fun and engaging manner. I've detailed the journey and the breakdown of the code in a blog post, which I invite you all to read for a deeper insight.

Check out the blog post for more details: Read the Blog Article ( https://www.eddieboscana.com/articles/exiting-loops-the-basics ).

Additionally, I've made the project's code available on GitHub. Contributions, improvements, or any learning usage of the codebase are warmly welcomed: View on GitHub ( https://github.com/EdenIsHereToStay/secret-word-game.git ).

I'm looking forward to your feedback and ideas!

2 Answers

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hey Eddie Boscanae 👋

Nice work on this project! Way to go practicing your newly acquired skills and sharing them on your own website like that 😃🔥

One suggestion that comes to my mind would be to wrap your input and button in a form tag. Then instead of listening for clicks on the button, you could use the submit event on the form. This would allow the user to submit their guess by either clicking the button, or hitting enter on their keyboard, improving the User Experience for keyboard users 😄

Keep up the great work! 😃

Eddie Boscana
Eddie Boscana
6,882 Points

oh very nice! I created this as github project. I'd love to see your suggestions in action. I'm still learning how to work with Git, so it would be cool to attempt to work with modifications and see how that process works, if you get some time. Thanks again!