Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics (Retired) Working With Numbers The Mad Libs Challenge Revisited

Generic question

Hi I was wondering if it really matters how I write out the code? My code is written slightly different to the video but it works.

Is there such thing as bad form/practice? Or is it a case of..If it works it works?

P.s First comment so not sure how to copy and paste my code

Thanks Paul

1 Answer

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

Hi Paul!

If you look just beneath the field where you write the post/answer there's a text called "Markdown Cheatsheet", click there to see some guidelines on how to post code etc :)

Regarding your main question, it depends. Sometimes it can have unwanted effects if you place your code in a "bad" way. even if it seems to work at the moment. Generally though, you're good to go as long as it works and you follow the practice that someone else should be able to read your code and be able to understand what it does. You will learn this as you go.

I hope that helps, happy coding!

Jonas

Thanks for your quick reply Jonas