A Way For Learning

Node JS

No comments
Node JS is not a beginner course,one need to have a basic knowledge on HTML and Java script.

Node JS is used for running the JavaScript code on the server.

Undefined : If we print any function that doesn't have any return parameter, then undefined is displayed.

Anonymous Functions : These are the functions that are stored in variables.

setTimeout() & setInterval(): setTimeOut runs once and calls the callback , where as setInterval rums multiple times with the mentioned time gap.

* console.log(19=='19'); prints TRUE : '==' is used when you only want to compare values.

* console.log(19==='19');prints FALSE : '===' is used when you want to compare both value and type.

this KEYWORD : It refers to the object that called it.

prototype : It is used to add/provide additional properties or methods to the objects.

Object Factory :  An object that creates another object.

Core Modules : fs-FileSystem, path, http ..etc

Creating a Server :
 var http = require('http');
    http.createServer(function (req, res) {
      res.writeHead(200, {'Content-Type': 'text/plain'});
      res.end('Hello World\n');
    }).listen(1337, "127.0.0.1");
    console.log('Serve/* r running at http://127.0.0.1:1337/');












No comments :

Post a Comment