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

General Discussion

Zeke Lin
Zeke Lin
1,240 Points

In the terminal, what does the code mean?

The teacher seems not to explain the code meaning in terminal... 'node app.js john' (Sorry, I forgot the real name he used in the video) Does it mean Run the app.js and set a variable named john to it?

1 Answer

Steven Parker
Steven Parker
231,184 Points

You're basically right. The first term is what you will run, in this case "node". The other terms are arguments to node.

Node then takes "app.js" to be the name of the file you want it to process (the JavaScript program). Anything left ("john" in this case) becomes arguments that are given to app.js.