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 trialJohn Coolidge
12,614 PointsIs Node.js like Python/Ruby/PHP etc.?
So, given Andrew's explanation of Node.js, is it fair to say that Node.js is JavaScript ran like Python or Ruby? I have just a small amount of Python experience and I recall running programs made with Python through the console, like we are doing with Node.js.
2 Answers
Mike Jensen
11,718 Pointsnode.js isn't a server-side language. JavaScript is the language. Node is a execution environment for Javascript that can be run in various places, including on your personal computer or on a server. It allows JavaScript to be used in similar ways to python or ruby for building web applications, because those other languages also have execution environments that can be installed on web servers.
Valerio Viperino
6,947 PointsYes, node.js can be used as a substitute for Python/Ruby/etc..! Actually, Node.js is entirely built upon C++. We use javascript as a higher level of abstraction from the machine, but all of the js we write is converted to C++ which is then converted to machine code. In fact Node.js builds upon the V8 js engine, which is written in C++. For this reason you don't need a browser in order to execute it, and you can run the .js files through the command line. You just need to have installed the node environment on the machine (which does the converting from regular js to C++).
Anthony c
20,907 PointsAnthony c
20,907 PointsI think the questioner here is probably looking to ask:
"can node.js be used as a substitute for Python/Ruby/PHP?"
In which the answer is: yes.