Primitive Data Types - Numbers, Strings, and Booleans

This section provides a quick description of JavaScript primitive data types, numbers, strings, and booleans.

JavaScript supports 5 primitive data types:

JavaScript is a dynamic typing language. Data types are associated with values, instead of variables. In other words, variables are declared without specific data types. They can be assigned with values of any data type.

In JavaScript source code, values of different data types can be provided as value literals as described in sections below.

Table of Contents

 About This Book

 Introduction to JavaScript

 ECMAScript Language Specification and JavaScript Dialects

Data Types, Variables and Expressions

Primitive Data Types - Numbers, Strings, and Booleans

 Numeric Value Literals

 String Literials

 Declaring Variables - "var" Statements

 Operators and Expressions

 Operators and Expressions - Examples

 Flow Control Statements

 Creating, Accessing, and Manipulating Arrays

 Defining and Calling Functions

 Web Browser Supporting JavaScript

 Server-Side and Client-Side Web Scripting

 Introduction to Objects

 Defining Your Own Object Types

 Inheritance of Properties and Methods through the Prototype Object Chain

 'jrunscript' - JavaScript Shell Command from JDK

 Using Functions as "Function" Objects

 Introduction to Built-in Object Types

 W3C's Document Object Model (DOM) Specifications

 References

 PDF Printing Version