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 trialPeter Retvari
Full Stack JavaScript Techdegree Student 8,392 Points?"I did it my way"?
Hi Folks, Could you please help? I displayed the HTML message (for my case is unordered list) in a different way. I didn't use another function to loop trough the ARRAY (bad and correct questions). I added to the if statements within the loop.
It works smoothly, however I wonder if a more experienced programmer could check if there something wrong with my code (e.g.: I wrote something in a stupid way, or it's not a good idea to use arrays like this..)
Here you can check my whole work: https://w.trhou.se/3ldv1qi38j
A million thanks in advance
Peace
another question btw :D How can I put here a code snippet? To display it in a "nice way"?
this method didn't work for me: ''' before and ''' after , or <div> before the code and </div> after
4 Answers
Steven Parker
231,248 PointsYour program seems reasonably well constructed. But please do not post messages or code containing profanity, that's a violation of the Code of Conduct and might get you into trouble!
And to post code that looks nice, use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. Ā Or watch this video on code formatting.
Peter Retvari
Full Stack JavaScript Techdegree Student 8,392 PointsThanks Steven for your quick help. Sorry for that, I will rewrite it ASAP. Thanks
Steven Parker
231,248 PointsRemember to make a new snapshot after changing the code, and then replace the link in the question.
Peter Retvari
Full Stack JavaScript Techdegree Student 8,392 PointsOfc, here you are: https://w.trhou.se/7fr6etzgis
(I've corrected it)
Steven Parker
231,248 PointsWhat I meant was to edit the original question to change the link. But this new link still contains the code with the profanity along with a new version.
Peter Retvari
Full Stack JavaScript Techdegree Student 8,392 PointsThanks Caleb for your help too :)
Caleb Kleveter
Treehouse Moderator 37,862 PointsCaleb Kleveter
Treehouse Moderator 37,862 PointsLooks good to me ?. I am not the greatest when it comes to the DOM, so I can't say whether there is a better way or not.