Category Archives: Uncategorized

Node JS introduction

This article covers some of the very basic Node JS features and its applications. Developers who are visiting this article for first the time, let me tell you that Node JS is not for beginners.

Pre-requisites 

  1. JavaScript
  2. HTML
  3. Knowledge of any server side programming language (optional)

Introduction

Node JS allows you to build scalable network applications using JavaScript on the server side

What can you build using Node?

  1. Chat server
  2. File upload
  3. Ad server
  4. Any real time data app

About Node Continue reading

Advertisements

JavaScript:~ basics Part 2

Welcome back!

In previous part we dicussed about variables, constants and functions. Those were the pretty basic constructs of JavaScript. They create the base of what we are going to learn next.

Obviously, in any program we just don’t stick with defining variables and functions. We do something with it. Every program defines a logic. A logic can be a simple math working out a formula and generating results. For example, calculating the area of cirle:

function areaOfCirle (radius) {
     const PI = 3.14;
     var area = PI * radius * radius;
     return area;
}
areaOfCirle(14);

Or, it can be DOM manipulation such as updating sections of HTML page. DOM manipulation and updating HTML page can be tricky topic to discuss for now as the tutorial is designed for beginners. Hence, we will drop it and cover it later (once we are comfortable with the rest of JavaScript).

Wondering where to run all this code we are writing?

Don’t go anywhere! A tool is available right in your browser window.

If you are on a windows or linux platform, press F12. This will open up the developer tools for the browser. Developer’s tools are used for debugging HTML sites. It also provides you with a console window where you can type and test your JavaScript code on the fly.

Go to the “console” tab and copy-paste the code written above. Press enter and you will see the results.

For Mac platform you can press Command + Shift + C or Command + Shift + J to open developer’s tool.

Let’s continue with our programming and this time we will create a program that uses a condition.