Basic Datatypes in Javascript.

Basic datatypes and build-in objects in JavaScript.

Primitive datatypes in JavaScript.

Datatype Value Comments
number 64-bit floating point Represented as values from ±5 x 10-324 to ±1.7976931348623157 x 10+308. All numbers are floating point in Javascript.
string sequence of characters Characters on one line surrounded by single(') or double(") quotes.
boolean true OR false Usually used in connection with controlling the outcome of related conditions in the program during the execution of this.

Single-value datatypes in JavaScript.

Datatype Value Comments
null null Is a special value that indicates no value for the dataype. For boolean it converts to false and for numeric it converts to 0.
undefined undefined Appear for a variable that has been declared but never had a value assigned to it or any value type that does not exist.

Objects in JavaScript.

Datatype Value Comments
object Container of other datatype values Is a collection of named values, that can be any datatype, other object or function value. All values is of public type.
array An ordered collection of numbered values. Each data value, which can be any datatype, object or function value, in an array has an index. All values is of public type. You can retrieve a value from an array by enclosing an index in square brackets. (arrayName[index])
function Has executable code associated with it. Can contain a collection of any datatype, object or function ,which can be private or public. Function can also contain function (inner function).

None fundamental datatypes in JavaScript.

Datatype Value Comments
Math An object with static math. methods Is a collection of mathematical static methods, used in special calculations.
Date An object that represents dates and times Allow you to get and set the various date and time values. You can convert the Date to a string, using either local time or GMT time.
RegExp An object for textual presentation Provide a rich and powerful syntax for describing textual patterns.
Error Objects for runtime error messages The types of predefined error objects are Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, and URIError.

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.