Technology Inside Out!

Index ¦ Archives ¦ Atom ¦ RSS

Introduction to Javascript

Introduction to Javascript

Hi everyone, welcome to this brief article discussing about javascript, we'll do this by discussing various fundamentals of javascript, javascript is a programming language that as a software developer you can't ignore. Javascript was first demonstrated and announced at conference at SanFrancisco in 1995, over the time web browsers emerged and javascript became one of the premium programming language of the future.

Javascript is not only used for making web pages but also for making applications, infact in September 2011 Microsoft announced it that it would be making javascript as a first class language for making native windows applications alongside C++ and C#.

Javascript is moved mainly from inside a browser only to also being used on web server for application logic, file logic, accessing database server and so on.

When your web browser downloads a web page it starts to parse all the html of webpage it starts creating a series of object of the webpage, that series of objects contains like its content and attributes and so on. This is known as Document Object Model or the DOM Elements. So you can use javascript to access the DOM in order to change the response on the web page. For example : A user might hover its mouse over an element, or clicking an element.

There is no "RIGHT WAY" to include a javascript file in html, but there are some practices that are being followed to include javascript. There is at least 3 different ways to include javascript.

Various uses of Javascript are

  • Javascript is used for show or hide text or image, based on some interaction on webpage.
  • Javascript is being used to apply styling on webpage.
  • Javascript is used for client side form field validation, as a first line of defense before sending data to web server.
  • Javascript has been used to animate element on screen (such as color/ opacity transition, moving graphics around the page, sliding elements around the page).
  • Entire games can be loaded via javascripts.
  • It can be used to communicate to web server without the need for http post or get.
  • And many more

HTML 5 and CSS 3 has reduced the need for javascript in some of these scenarios, some form validations, some animations, these are now handled by HTML 5 and CSS 3.

What you should know before we move on to our next article

  • First of all since you have interest in javascript then you are an active web designer, then you should be familiar with HTML and CSS and good understanding on how to work.
  • Recognize JavaScript in documents if you saw it, you dont have to use it before you should know how a javascript looks like.

What is Javascript ?

The most common question before anyone starts working in Javascript is,  "What is JavaSript  ? " Remember that Javascript is NOT Java. They are totally different, let not the name confuse you.


  • Javscript is the programming language of the web.
  • It creates interactively, it helps you to click, drag, tap, swipe, tap, etc.
  • It is most commonly used for front end development, i.e any kind of programming that happens in a web browser.
  • It is also used in back end development as well like Node.JS.
  • So javascript is used for any programming on the web.

Where should we not use javascript ?

  • We should use CSS3 transitions instead of Javascript, CSS3 transitions are more powerful, especially on mobile platform where they are more performant.
  • CSS can handle hover and focus events (like rollover menus. tooltips, etc) we dont need javascript at all.
  • HTML5 form controls can be used as custom widgets (like range controls, sliders, etc), this will help on mobile platforms.

Hope this article might give you some information about javascript or make some interest in javascript. In our next article we will discuss about writing our first Javascript application.

© The Geeky Way. Built using Pelican. Theme by Giulio Fidente on github.

Disclaimer Privacy policy