Advanced JavaScript Tutorial

JavaScript is the most popular scripting language on the Internet, existing in all web browsers worldwide and capable of enhancing the interaction between users and web sites and web applications.

This tutorial is an advanced version of the CodeW3C JavaScript tutorial.

This tutorial starts from the history of JavaScript and goes up to its current support for XML and web services.

You will learn how to extend the language to meet special needs.

You will also learn how to use JavaScript to create seamless client-server communication.

Start learning the advanced tutorial of JavaScript !

Table of contents

Introduction to JavaScript

History of JavaScript
This section explains the origin of JavaScript and client-side scripts for you.
JavaScript Implementation
A complete JavaScript implementation is composed of the following three different parts: ECMAScript, Document Object Model, and Browser Object Model.

ECMAScript basics

ECMAScript Syntax
Java and ECMAScript have some key syntactic features in common, as well as some that are completely different. This section details the syntax of ECMAScript.
ECMAScript Variables
This section explains how to declare and name variables, as well as some famous variable naming rules.
ECMAScript Keywords
This section provides a complete list of ECMAScript keywords.
ECMAScript Reserved Words
This section provides a complete list of ECMAScript reserved words.
ECMAScript Values
This section explains the primitive values and reference values in ECMAScript, as well as the concept of ECMAScript primitive types.
ECMAScript Primitive Types
This section details the five primitive types in ECMAScript: Undefined, Null, Boolean, Number, and String.
ECMAScript Type Conversion
This section explains the type conversion methods provided by ECMAScript, as well as how to perform explicit type conversion.
ECMAScript Reference Types
Reference types are usually called classes (class) or objects. This section explains the predefined reference types in ECMAScript.

ECMAScript operators

ECMAScript Unary Operators
Unary operators have only one parameter, which is the object or value to be operated on. This section explains the simplest operator in ECMAScript - the unary operator.
ECMAScript Bitwise Operators
Bitwise operators operate at the low level of numbers. This section delves into the knowledge of integers and introduces various bitwise operators in ECMAScript.
ECMAScript Boolean Operators
Boolean operators are very important. This section delves into the three Boolean operators: NOT, AND, and OR.
ECMAScript Multiplicative Operators
This section explains the multiplicative operators in ECMAScript: multiplication, division, and modulus operators, as well as their special behaviors.
ECMAScript Additive Operators
This section explains the additive operators in ECMAScript: addition and subtraction operators, as well as their special behaviors.
ECMAScript Relational Operators
Relational operators perform comparison operations. This section explains the conventional comparison methods of relational operators, as well as how to compare strings with numbers.
ECMAScript Equality Operators
Equality operators are used to determine if variables are equal. ECMAScript provides two sets of equality operators: equal to and not equal to, as well as strictly equal to and strictly not equal to.
ECMAScript Conditional Operators
This section explains the conditional operators in ECMAScript.
ECMAScript Assignment Operators
This section explains the assignment operators in ECMAScript.
ECMAScript Comma Operator
This section explains the comma operator in ECMAScript.

ECMAScript Statements

ECMAScript if Statement
The if statement is one of the most commonly used statements in ECMAScript. This section explains in detail how to use the if statement.
ECMAScript Iteration Statements
Iteration statements, also known as loop statements. This section introduces the four iteration statements provided by ECMAScript.
ECMAScript Labelled Statements
This section briefly introduces labeled statements.
ECMAScript break and continue Statements
This section explains the differences between the break statement and the continue statement, and how to use them with labeled statements.
ECMAScript with Statement
The with statement is used to set the scope of code within a specific object. This section introduces the usage of the with statement.
ECMAScript switch Statement
The switch statement is a sibling of the if statement. This section introduces the usage of the switch statement and the differences from the switch statement in Java.

ECMAScript Functions

Overview of ECMAScript Functions
This section explains the concept of functions, how ECMAScript declares and calls functions, and how functions return values.
ECMAScript arguments Object
This section introduces the basic usage of this object and then explains how to use the length property to determine the number of function parameters and simulate function overloading.
ECMAScript Function Object (Class)
This section explains how to create functions using the Function class and then introduces the properties and methods of the Function object.
ECMAScript Closures (Closure)
This section explains the concept of closure (closure) and shows two simple and slightly complex closure examples.

ECMAScript Objects

Object-Oriented Technology in ECMAScript
This section briefly introduces the terminology of object-oriented technology, the requirements of object-oriented languages, and the composition of objects.
Application of Objects in ECMAScript
This section explains how to declare and instantiate objects, how to reference and dispose of objects, and the concept of binding.
Object Types in ECMAScript
This section introduces the three types of ECMAScript: local objects, built-in objects, and host objects, and provides links to the relevant reference manuals.
Scope of Objects in ECMAScript
This section explains ECMAScript scope and the this keyword.
Defining Classes or Objects in ECMAScript
This section details various ways to create ECMAScript objects or classes.
Modifying Objects in ECMAScript
This section explains how to modify objects by creating new methods or redefining existing methods.