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
Samuel Glister
12,471 PointsOpinion Time - My first program
Hi All,
After cracking how to build web pages I am trying to get to grips with Javascript and how it work.
So i've created a small program which has some simple conversion calculators on it and other tools that could benefit people I work with.
I wanted to get everyones opinion on how well it works. I feel like i've written a lot of lines of script which I could have done simpler?
Heres the link https://w.trhou.se/3gevqu5ojk
Thanks
1 Answer
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsCool. It looks great, very clean and organized. A few little comments:
You spelled "measurement" as "measurment" in one of your tabs.
Maybe you should take your javascript code and put it into a different file? It's a lot to have in one file and then it's harder to reuse your code elsewhere.
A lot of your functions look very similar. Along the lines of DRY programming, it might make sense to create more of a higher level function that then takes arguments for the different variables that make the implementation different.
You might add some CSS styling so it's not all white, help us focus on where the input goes and where the output comes out. Also maybe some media queries so that it would work on smaller screen sizes. Also it might look a little better if the main header and tabs were centered
Samuel Glister
12,471 PointsSamuel Glister
12,471 PointsHey Brendan,
This is great stuff - thank you for the feedback.
Maybe with a little more practice I will be able to create a more complex function.
I am now working on styling this page up so hopefully will have the finished product soon!
Thanks