Introduction to popular scripting language of the web.

What is JavaScript?

JavaScript is a scripting language. It was first introduced in Netscape Navigator 2.0 in September 1995. Originally, It was called LiveScript but was soon renamed to JavaScript. It runs on visitor's computer (client-side). Because of javascript web sites become more dynamic and interactive.

JavaScript and Java

JavaScript is not Java. They are alike but there are significant differences between these two languages.

  • JavaScript is interpreted language and Java is compiled language.
  • JavaScript is largely a complementary language and Java applications can stand alone.
  • JavaScript is primarily used for web-related programming and Java is used for more complex applications.
  • JavaScript is a loosely typed language and Java is strongly typed language.
  • JavaScript uses dynamic binding and Java uses static binding.

What JavaScript can do?

JavaScript can perform many tasks on the client side of the application. It is often used to perform operations such as input validations, getting the current datetime, detecting visitor's browser, creating cookies, controling browser, adding interactivity, change page contents dynamically and so on and much more.

What JavaScript can’t do?

JavaScript is fast, powerful and easy. However, there are also a few things that JavaScript can't do. Most JavaScript functionalities are limited by browser window. Most of the limitations are there for security reasons. Following is somethings that cannot be done by javascript alone.

  • It cannot access the local/remote file system. Cannot read or write files with JavaScript.
  • It cannot direct access to hardwares such as mouse, keyboard, printer, scanner, webcam, etc.
  • It cannot run any application outside the browser.
  • It cannot change the URL displayed by the browser.
  • It cannot change the browser history.
  • It cannot direct access to database system.
  • It cannot sent the email.
  • It cannot encrypt/decrypt.
  • It cannot protect your page source or images.
  • It cannot use multiple threads.
  • It cannot close a window if it didn't open it.
  • It cannot access web pages hosted on another domain.

There are much more than those. Please add it in comment if you know one. But keep in mind that there are exceptions for each of it. As you know, JavaScript is alive and under constant development. New features are adding day by day.

What do I need to run JavaScript?

No special program is required to run javascript, all the major web browsers support it. All you have to do is enable it.

What do I need to write JavaScript?

No special program is required to write javascript as well. Any text editor can be used. Even notepad can be used to write JavaScript. Just use the same editor that you used for html editing.



author's photo

Author : Blue Cloud

Just a normal software developer who love to write code. Developing professional software since 1999. After working in the software industry for many years, I've started my own website to share knowledges and experiences.

COMMENTS
blog comments powered by Disqus
Contributors