introduction to javascript programming


introduction to javascript programming

Javascript is a dynamic client side, interpreted and prototype based programming language. It's also used as a server side programming language in frameworks like nodejs, Apache CouchDB.JS .JavaScript follows the standards of ECMA(European Computer Manufacturers Association). All modern Web browsers support JavaScript with built-in interpreters.

Differences between Java and Javascript

  • Most of the beginners/students confuses with Java and JavaScript. These are two different programming languages.
  • Java is an OOP comiled programming language where as JavaScript is prototype based interpreted language.
  • Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only.
  • Java code needs to be compiled while JavaScript code interpreted with a javascript Engine(it's a browser based one).

Why to learn Javascript ?

  • Most used language in webdevelopment.
  • Largest support community (stackoverflow)
  • Provides more career oppurtunities because of it's vast usage.
  • Has many libraries provided by npm
  • Javascript is  a opensource language

Advantages of Javascript ?

  • It works on client side so, It will not use server's CPU. It saves bandwidth of the server.
  • One of the easiest programming languages to learn as a beginner.
  • It provides liveliness to webpages with events like click, drag etc.

Disadvantages of Javascript

  • Javascript snippets, once appended onto web pages execute on client servers immediately and therefore can also be used to exploit the user's system.
  • Different layout engines may render Javascript differently resulting in inconsistency in terms of functionality and interface. While the latest versions of javascript and rendering have been geared towards a universal standard, certain variations still exist.

Features of Javascript

  • Javascript is a prototype based(objecct oriented) language.
  • It has Universal Support
  • It supports both imperative and structured programming language style.
  • Function also can be cosidered as an object. In javascript, every function has two methods call() and bind().
  • Javascript supports both explicit and implicit delegation.
  • JavaScript typically relies on a run-time environment (e.g., a Web browser) to provide objects and methods by which scripts can interact with the environment (e.g., a webpage DOM).
  • JavaScript processes messages from a queue one at a time. Upon loading a new message, JavaScript calls a function associated with that message, which creates a call stack frame