Discover Node.js and move from frontend to backend
Difficulty: Junior ● Progress: 0 / 0 modules completed
Separating your files
With NodeJS, it is very easy to split your code into several files in order to maintain clean and readable code!
To do this, we are going to use Node's module creation features.
Let's take our previous example again, which we will modify slightly. Create a hello.js file, like this:
function hello(name){
console.log("Hello " + name);
}
You need a free account to read this module