var sys = require("util");
When i try to run this code in the console, i get undefined as output. Even the below statement while executing throws me undefined.
console.log("Hello World");
Output
Hello World
Undefined
Are we going to create our own server and write code with node.js?
The last
undefinedis result returned from console.log method:As you can see, first ‘hey’ printed by console.log, but console.log returns undefined as result of operation, and it printed to output.