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!

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

JavaScript Node.js Basics 2017 Building a Command Line Application Getting the Response Body

Why make object to string?

At 4.06 Andrew says when make it object by parsing string? Why do we need to make it object while we already have string?

Steven Parker

1 Answer

Steven Parker
Steven Parker
227,141 Points

:bell: Hi, I got alerted by your tag.

The string contains the representation of an object that was previously converted into a string to simplify transmission. The purpose for parsing it is to convert it back into an object so the internal properties can be accessed.

This all might make a bit more sense after you see the next video.