What is JavaScript

JavaScript intro


JavaScript is a name that anyone using computers have heard about.  Before we begin one needs to keep in mind that:

JavaScript is NOT JAVA

JavaScript is one the most commonly used scripting languages which primarily runs on you Web Browser.   The primary use of JavaScript is to manipulate a HTML Page (along with CSS) based on users requirements (of course some has to program that!!).

JavaScript today is used almost by around 99% of websites. In very rare occasions you will come across  a site not using JavaScript.

You could see some survey reports about same on w3tech JavaScript survey.

What is JavaScript?

JavaScript is a client side scripting language used for adding dynamism to you existing HTML pages.  HTML as we know today is primarily used for Structure and Semantics  of a web page and CSS is used for the styling of the visual output of the page design and typography.

But when it comes to managing or updating any of theses during the runtime or users interaction with the page via mouse, keyboard etc HTML and CSS are not capable to do much.

Enter JavaScript.  JavaScript is capable of manipulating the structure, content and CSS of a web page if a programmer wants.

JavaScript first came to picture publicly in December 1995 and the primary developer is  Brendan Eich of Netscape.    

JavaScript Features

JavaScript is a high-level language ( Follows the  ECMAScript standard.) 

Few of its features are

  • Dynamic typing
  • Prototype based object orientation. 
  • Event-driven
  • Functional
  • Has imperative programming styles. 
  • Has APIs for working with text, dates, regular expressions, standard data structures
  • And has complete to manipulate the Document Object Model (DOM)

These features allow programmers to have simple HTML pages do amazing things. 

What can you do with JavaScript

You can do many things from very very simple things like showing simple popup messages to users to complex animation or validation of inputs. Much of the magic that you have seen on webpages few of which include:

  • Drop down or pull down menus
  • Hide show paragraphs
  • Fade effects on images
  • actions taken on clicking buttons
  • Restriction of right click on page
  • Simple games
  • Background updates (via AJAX) like weather info, match scores etc
  • Show messages to user while entering or exiting pages.
  • And much much more.
  • Make web application more better.

Who uses JavaScript

Almost everyone knowingly or unknowingly uses JavaScript.  But as usual if a few big names say that they use the same it provides a huge impact. So here is a list of few major player of the net who use JavaScript:

  • Google.com
  • Facebook.com
  • Youtube.com
  • Twitter.com
  • Instagram.com
  • Linkedin.com
  • Netflix.com
  • Wikipedia.org
  • Hotstar.com
  • Amazon.com

Event this website uses a lot of JavaScript.

Advantages of JavaScript

Primarily JavaScript makes existing pages more dynamic.  But JavaScript when used with a full stack, i.e. in collaboration of server side scripts and other things it makes the complete experience much better.

  • In a complete site setup many things that would be usually sent to server and checked can now be done on client side itself thus reducing number request and response. e.g. Making sure the user fills a web-form properly.
  • With help of AJAX many calls can be made in the background and time can be saved.
  • Rich experience to uses with slide shows and popups etc.
  • Simple mathematical calculations and simple calculators for users  often seen on banking website to calculate ROI, Interest etc.
  • With more features of HTML5 using JavaScript drag and drop of images is possible.
  • Use of Geo-location
  • And much much more. 

Final Thoughts

Though many people pick up JavaScript to be one of the first programming languages while web development, find it much complicated and difficult to use initially. But there is no running away from it. JavaScript to has its deployment on servers side also via special engines (like nodeJS).

One need to keep in mind the a complete understanding and appreciation of JavaScript only happens when you start a full stack development using LAMP type technology (i.e. use a server side scripting language and database etc.).  This is when you see the difference of what things needs to be processed on the server itself and what need to be processed on the client. Also how both JavaScript and the server side technology makes a great team.

Main category

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
4 + 8 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

"Natraj"  Bungalow,
Colony No.7,  Sr.No. 38.
(Lane Behind Sai Baba Mandir)
Kale Borate Nagar, Hadapsar,
Pune - 411028.
Get Directions