Programming Tutorials

JavaScript Features

By: aathishankaran in JavaScript Tutorials on 2007-03-21  

JavaScript is dependent on Browsers

JavaScript is but a scripting language, not a tool in and of itself. The software that actually runs the JavaScript code you write is the Web browser. JavaScript depends on the Web browser to support it. If the browser does not support it, your code will be ignored. Even worse, if you do not account for unsporting browsers, the JavaScript code itself is displayed as text on your page.

Commonly available Browser are:

  • Chrome
  • Firefox
  • Microsoft Edge
  • Safari

JavaScript Is an Interpreted Language

As with most scripting languages,. JavaScript is interpreted at runtime by the browser before it is executed. JavaScript is not compiled into an actual program like an .EXE file but remains part of the HTML document to which it is attached.

The disadvantage of an interpreted language is that it takes longer for the code to execute because the browser compiles the instructions at runtime just before executing them. However, the advantage is that it is much easier to update your source code. You do not have to worry about old versions of a JavaScript script hanging around because if you change it in your source HTML file, the new code is executed the next time the user accesses the document.

JavaScript Is a Loosely Typed Language

JavaScript is far different from strong-typed languages such as Java or Delphi, in which you must declare all variables of a certain type before using them. In contrast, JavaScript is much more flexible. You can declare variables of a specific type, but you do not need to. You can also work with a variable when you might not know the specific type before run time.

JavaScript Is an Object-Based Language

You might see JavaScript referred to as an object-oriented programming (OOP) language by Netscape and others, but this is actually a stretch of the true meaning of OOP. JavaScript is really an object-based language.

JavaScript Is Event-Driven

Much of the JavaScript code you write will be in response to events generated by the user or the system. The JavaScript language itself is equipped to handle events. HTML objects, such as buttons or text fields, are enhanced to support event handlers.

JavaScript Is Multifunctional

JavaScript is multifaceted and can be used in a variety of contexts to provide a solution to a Web-based problem. Uses of JavaScript are:

  • Enhance and liven static HTML pages.
  • Develop client-side apj3lications.
  • Serve as a building block for client/server Web applications.
  • Serve as client-side glue between HTML objects, Java applets, ActiveX controls, and Netscape plug-ins.
  • Serve as an extension to a Web server. .
  • Provide database connectivity without using CGI.

Add Comment

* Required information


No comments yet. Be the first!

Most Viewed Articles (in JavaScript )

Latest Articles (in JavaScript)