What is a Script ?
A script is an executable list of commands like macro or batch file created by a scripting language. Scripts (like PHP, Perl) which are executed on a web server are called server-side scripts and scripts (like JavaScript) which are executed on user's computer, interpreted by the browser is called client-side scripts.
What is JavaScript ?
JavaScript is a cross-platform, object-oriented scripting language developed by Netscape. JavaScript was created by Netscape programmer Brendan Eich.
It was first released under the name of LiveScript as part of Netscape Navigator 2.0 in September 1995. It was renamed JavaScript on December 4, 1995. As JavaScript works on the client side, It is mostly used for client-side web development.
JavaScript is designed for use on web pages and closely integrated with HTML. JavaScript can create applications which run in the browsers such as IE, Opera, FireFox, Google Chrome and other. Netscape submitted JavaScript to ECMA International for standardization resulting in the standardized version named ECMAScript.
JavaScript and Java
JavaScript and Java are similar in some ways but fundamentally they are different. Java is a programming language developed by Sun Microsystems, Inc. and JavaScript is a scripting language developed by Netscape. Java is a server-side and static type language. JavaScript is a client-side, dynamically typed language. Java programs are compiled on the server and run on almost every platform without distribution of source code where as scripts written in JavaScript are placed inside a HTML document and interpreted by the browser. The syntax, reserved-words of JavaScript and Java are also different.
JavaScript compare to Java
JavaScript | Java |
---|---|
JavaScript is used for front-end web development (for example field level validation in a HTML form). | Java is used as a back-end language within a web environment. |
Interpreted (not compiled) by client. | Compiled bytecodes downloaded from server, executed on client. |
Object-oriented. No distinction between types of objects. Inheritance is through the prototype mechanism, and properties and methods can be added to any object dynamically. | Class-based. Objects are divided into classes and instances with all inheritance through the class hierarchy. Classes and instances cannot have properties or methods added dynamically. |
Variable data types not declared (loose typing). | Variable data types must be declared as Java maintains strong type checking. |
Cannot automatically write to hard disk. | Cannot automatically write to hard disk. |
Features of the w3resource JavaScript Tutorial
In this series of tutorials we have covered JavaScript 1.5+ in detail. While creating this, we have taken care that learners can master the basics of JavaScript.
Here is a list of features we have included in all of the chapters :
- We have started with a clear and simple description.
- We have given a Syntax/Usage so that you can remember how to write it.
- Example(s) to show how the associated concept is implemented.
- We have shown the Output of the usage.
- View the example in browser.
- Exercise to practice with our Online Practice Editor.
- Pictorial presentation to help you to understand the concept better.
- Since browser is an issue while executing JavaScript, we have shown which browser support which script.
Please Google+, Like this tutorial on FaceBook, Tweet, save it as bookmark and subscribe with our Feed. Have suggestions? comment using Disqus down this page. Thanks.
No comments:
Post a Comment