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 trialDino Heras
8,381 PointsStoring functions in Variables
Is there a particular reason for storing a function in a variable? Is it best practice?
3 Answers
jason chan
31,009 PointsAvoids collision.
Dino Heras
8,381 PointsHello jason chan what do you mean by avoid collisions?
jason chan
31,009 Pointshttp://www.smartvault.com/blog/2013/javascript-namespace-collisions-and-how-to-avoid-them/
Because javascript doesn't really have like library name like other languages. Other libraries will collide and you might over write other functions and variables. So becareful.