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 trialNazmul Haque Sajol
13,594 PointsFunction() Position
I have learned something about function that it's a good practice to place all of our variable and function at the top of our page as a reference. But in this project, functions are placed scatter below which making me sometimes confused.
1 Answer
Calvin Miracle
22,028 PointsThe following Stack Overflow article has a good explanation of code hoisting and function expressions vs function declarations.
http://stackoverflow.com/questions/7609276/javascript-function-order-why-does-it-matter