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
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Comments