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 trialAna María Benites Rodríguez
1,011 PointsWhy running this code in the node.js terminal and not in the browser console?
why in this exercise we need to run node.js from the terminal and we can not just test this code in the browser?Thanks!
1 Answer
Ana María Benites Rodríguez
1,011 Pointsthanks @Adam Beer for the quick answer. Why when I write "normal" JS I can run it directly from the browser and why in this case I have to run it from the server (using node from the terminal)? thanks!
Adam Beer
11,314 PointsPlease mark where you are in node.js course.
Adam Beer
11,314 PointsAdam Beer
11,314 PointsNode.js is running in the background, easiest to get from the terminal to reach. If you use native node or express and give a port you also have access to the browser. But the simplest way is to test it from the terminal.