• Home
  • Tutorials >
  • HTML 4.01
  • CSS
  • HTML 5
  • Schema.org
  • JavaScript
  • php.js
  • PHP
  • SQL
  • MySql
  • MongoDB
  • JSON
  • Twitter Bootstrap
w3resource logo
  • Most Popular
  • Featured Content
  • Home
  • JavaScript Home
  • JavaScript Overview
  • JavaScript and HTML Documents
  • Writing first JavaScript program
  • JS Values, variables, and literals
  • JS alert(), prompt(), confirm()
  • Read from and write to HTML Document
  • JS Operators
  • JS Statements
  • JS Functions
  • JS working with Objects
  • JS Core objects, methods, properties
  • JS Client side objects, properties, methods
  • JS Event-handlers
  • JS Object's Event handlers
  • JS Form validation
  • JS Cookies
  • JS Error handleing and Debugging
  • JavaScript 1.5 Deprecated Features

JavaScript Tutorial

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.

javascript logo

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.

w3r video tutorialsWatch Overview of JavaScript video tutorial.

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.


The only purpose of w3resource is to provide free content for learning. All examples included here are for understanding the associated concept. Though checked thoroughly and continuously, full correctness of the entire content is not guaranteed. You are free to use the code provided here if you solely bear the responsibility of using that. You must read, understand and accept our policies, while using this site.

©2012-13 by w3resource. All rights reserved. Privacy | Copyright | About us | Feedback