Introduction

JavaScript is a cross-platform, object-oriented scripting language.

It is a small and lightweight language. Inside a host environment (for example, a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.

Prerequisites

This guide assumes you have the following basic background:

JavaScript and Java...

JavaScript and Java are similar in some ways but fundamentally different in some others.

The JavaScript language resembles Java but does not have Java's static typing and strong type checking. JavaScript follows most Java expression syntax, naming conventions and basic control-flow constructs which was the reason why it was renamed from LiveScript to JavaScript.

In contrast to Java's compile-time system of classes built by declarations, JavaScript supports a runtime system based on a small number of data types representing numeric, Boolean, and string values. JavaScript has a prototype-based object model instead of the more common class-based object model. The prototype-based model provides dynamic inheritance; that is, what is inherited can vary for individual objects. JavaScript also supports functions without any special declarative requirements.

Functions can be properties of objects, executing as loosely typed methods.
arrow_right_altHello World