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 trialAndrei Li
34,486 PointsWhat is primary function of call and create.Object?
As understood call like a connection of two cells. And create.Object is the official birth of a child? Is it correct comparison? What happens if I use call but didn't declare create.Object?
1 Answer
Steven Parker
231,275 PointsI think you mean "Object.create" (instead of "create.Object"). It does create a new object, based on an existing one.
The "call" method just invokes the function but it allows the value to be used for "this" to be supplied as an argument. This can be handy for re-using methods of one object by another, but "call" can be used even if no objects are involved.