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
Chase Allbee
10,767 Pointsrequire question
I've never encountered something similar to the http = require("http");
I just want to make sure I'm understanding this correctly, but is this similar to including header files in something like C? Meaning, that we're linking to some other kind of code that has it's own methods? Or Is it something else?
1 Answer
Zahscha Gonzalez
27,775 PointsThis is not part of the core JavaScript language, but yes, it works the same way as it would in C/Python/PHP and other languages that use require() for including or linking to other code.