Thursday, 13 March 2014

JavaScript: Advantages-


Advantages-
  • As part of web browsers, implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.
  • It has also become common in server-side programming, game development and the creation of desktop applications.
  • The application of JavaScript to use outside of web pages—for example, in PDF documents, site-specific browsers, and desktop widgets.
  • By using JavaScript in your web pages, you can gain more control of how the page looks and behaves: document elements can be inspected, form elements validated before the contents are sent, browser details checked, cookies set, dates and times can be added to the page, and even simple games can be added to a web page.

JavaScript and Java:

The differences between the two languages are more prominent than their similarities. Java has static typing, while JavaScript's typing is dynamic (meaning a variable can hold an object of any type and cannot be restricted). Java is loaded from compiled byte code, while JavaScript is loaded as human-readable source code.

No comments: