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 trialRyan Wikle
5,774 PointsWhat is chunk?
In the code in the video what is chunk? Is it a constant that was created or is it a method built into javascript?
1 Answer
Steven Parker
231,269 PointsThe "chunk" is defined on line 11 as the name of the parameter of the arrow function that will be called when any data arrives. At this point, "chunk" will contain a reference to data that just came in.
Along with reviewing the video, you might want to take a look at the Anatomy of an HTTP Transaction in the node documentation.