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

JavaScript

I am not understanding what the and how the curly braces are used in node js. Inside of the method , {} as a param.

I want to know why the curly braces need to be wrapped around the param … the Node js app exercise ..

1 Answer

It sounds like it's a function or method that's taking in an object as one of it's arguments.

This is a common pattern for functions that have a lot of optional behaviors.