JavaScript is used to include message, scrolling text, animations, menus, pop-up windows etc. JavaScript is directly embedded in HTML.
JavaScript was developed by Sun Micro system and Netscape communicators. It is an open language. It can be used without purchasing. Netscape supports JavaScript and Internet Explorer supports Jscript. Jscript is a subset of JavaScript.
Interpreted Programs versus Complied Programs:
An interpreted programming language is simpler to program but slower to execute. A program is interpreted line by line each time it is execute. Compiled programming language has a more complex syntax and requires programming language is given to compiler to produce an executable binary program. A compiler usually generates platform specific program with .exe extension.
Java is a compiler language that is platform independent whereas JavaScript is an interpreted language. The browser provides the platform independence for java through its java virtual machine and the interpreted for JavaScript.
Advantages of Java Script Language
There is lot of advantages of using JavaScript in Web Technologies. Some Advantages of using JavaScript are as follows.
Interpreted languages
JavaScript is an interpreted language. It requires no compilation process so no compiler is required. The browser interprets JavaScript as it HTML tags.
Easy to learn
The syntax of JavaScript is very easy. Any person can learn it very easily and use it to develop dynamic and attractive websites.
Easy to Debug and Test
JavaScript code is interpreted line by line. The errors are indicated along with line number. It is very easy to find error in the code, correct it and test it gain.
Event-Based Programming
JavaScript is an event-based language. It means that different code segment is executed when certain event occurs. For example, a code segment may execute when the user click button or moves a mouse over an object etc.
Procedural Capabilities
JavaScript provides all capabilities of a procedural language. It provides condition checking, loops and branching facilities that can be executed in a web page.
Platform Independence
JavaScript is platform independed language. Any JavaScript-enabled browser can understand and interpreted JavaScript code. Any JavaScript code is executed on different types of hardware a JavaScript program written for.
Uses of JavaScript
Some important uses of JavaScript are as follows.
Input Validation
JavaScript can be used to validate the input. Data entered informs should be validated before it is processed. For example, if a user enters a email, it must be valid email. JavaScript code can ensure its validity by checking that contain @ symbol and dot(.).
Mouse Rollover Effects
JavaScript can used to create different buttons with interesting mouse rollover effects. When the user moves the mouse over a button, different effects are generated. It makes browsing more interesting and attractive.
Popup Windows
JavaScript can be used to create popup windows. These windows are normally used to display important announcements, offers and news etc. Popup windows can be created of different sizes.
Dynamic Contents
JavaScript can be used to generate dynamic contents in a website. For example, the current date and time can be display on a web page. Different HTML tags can be generated based on the user input etc.
User Interaction:
JavaScript can be used to interest with the user. The input entered by the user can be processed and proper message can be displayed to the user. The interactive capabilities of a website make it more interesting and productive for the users.
Author Bio:I enjoy writing topics of my interest and passion. I have been doing this since my college days. My special interests are in Web Design,Languages,SEO and following the latest trends in these areas.I am the founder and CEO of actwitty.com
Top comments (0)