JScript Version Information

JScript is a language that continues to evolve, and each new version of the language introduces new features. To take advantage of all the features provided by a particular version of the language, a compatible version of compiler or script engine is required.

Versions and Host Applications

The version of JScript that is available to you depends on whether the JScript code will run on the client in a Web browser or on the server by using the .NET Framework. If the code is contained in a Visual Studio application or is within a command-line application, it is considered server-side code.

JScript (Windows Scripting)

When you write client-side scripts that run in the script engine of a browser, the running script detects the engine version. Once the engine version is known, a script written in a compatible version of JScript can be run. For more information, see Detecting Browser Capabilities.

The following table lists the version of Microsoft JScript implemented by host applications.

Host application

JScript version

Internet Explorer 3.0

1.0

Internet Information Server 3.0

2.0

Internet Explorer 4.0

3.0

Internet Information Server 4.0

3.0

Visual Studio 6.0

4.0

Internet Explorer 5.0

5.0

Internet Explorer 5.01

5.1

Windows 2000

5.1

Internet Explorer 5.5

5.5

Internet Explorer 6.0

5.6

Windows XP (through SP2)

5.6

Internet Explorer 7.0

5.7

Windows XP SP3

5.7

Windows Vista

5.7

Internet Explorer 8.0

5.8

For more information about JScript client-side scripts, see JScript (Windows Script Technologies).

JScript in Visual Studio

When you write code for a server-side application or a command-line application, the version of JScript that is available to you depends on the .NET Framework version that you are targeting. The following table lists the version of Microsoft JScript that is implemented by each version of the .NET Framework.

Visual Studio version

.NET Framework version

JScript version

Visual Studio .NET 2002

.NET Framework 1.0

JScript 7.0 (JScript .NET 2002)

Visual Studio .NET 2003

.NET Framework 1.1

JScript 7.0 (JScript .NET 2003)

Visual Studio 2005

.NET Framework 2.0

JScript 8.0

Visual Studio 2008

.NET Framework 3.5

JScript 8.0

Note

The version number reported by the ScriptEngineMajorVersion function and the @_jscript_version conditional compilation variable is always numeric. This allows numeric comparisons to be made with the version number. For version .NET applications, the version reported is 7.x, not him in a .NET. Engines that report a version number of 7.x or higher can compile JScript 8.0 code.

Language Elements

The following table lists JScript language features and the JScript version in which they were first introduced. The .NET 7.0 and 8.0 column applies to JScript .NET 2002, JScript .NET 2003, and JScript 8.0, all of which shipped with the same language features.

JScript 5.8 introduced these language elements that are not present in JScript versions 7.0 and 8.0: JSON object, JSON.parse method, JSON.stringify method, toJSON method, defineProperty method, getOwnPropertyDescriptor method.

Language element

1.0

2.0

3.0

4.0

5.0

5.5

.NET 7.0 and 8.0

0...n Property

 

 

 

 

 

x

 

$1...$9 Properties

 

 

x

 

 

 

 

abs Method

x

 

 

 

 

 

 

abstract Modifier

 

 

 

 

 

 

x

acos Method

x

 

 

 

 

 

 

ActiveXObject Object

 

 

x

 

 

 

 

Addition Operator (+)

x

 

 

 

 

 

 

Addition Assignment Operator (+=)

x

 

 

 

 

 

 

anchor Method

x

 

 

 

 

 

 

apply Method

 

 

 

 

 

x

 

arguments Object

x

 

 

 

 

 

 

arguments Property

 

x

 

 

 

 

 

Array Object

 

x

 

 

 

 

 

asin Method

x

 

 

 

 

 

 

Assignment Operator(=)

x

 

 

 

 

 

 

atan Method

x

 

 

 

 

 

 

atan2 Method

x

 

 

 

 

 

 

atEnd Method

 

 

x

 

 

 

 

big Method

x

 

 

 

 

 

 

Bitwise AND Operator (&)

x

 

 

 

 

 

 

Bitwise AND Assignment Operator (&=)

x

 

 

 

 

 

 

Bitwise Left Shift Operator (<<)

x

 

 

 

 

 

 

Bitwise NOT Operator (~)

x

 

 

 

 

 

 

Bitwise OR Operator (|)

x

 

 

 

 

 

 

Bitwise OR Assignment Operator (|=)

x

 

 

 

 

 

 

Bitwise Right Shift Operator (>>)

x

 

 

 

 

 

 

Bitwise XOR Operator (^)

x

 

 

 

 

 

 

Bitwise XOR Assignment Operator (^=)

x

 

 

 

 

 

 

blink Method

x

 

 

 

 

 

 

bold Method

x

 

 

 

 

 

 

boolean Data Type

 

 

 

 

 

 

x

Boolean Object

 

x

 

 

 

 

 

break Statement

x

 

 

 

 

 

 

byte Data Type

 

 

 

 

 

 

x

call Method

 

 

 

 

 

x

 

callee Property

 

 

 

 

 

x

 

caller Property

 

x

 

 

 

 

 

catch Statement

 

 

 

 

x

 

 

@cc_on Statement

 

 

x

 

 

 

 

ceil Method

x

 

 

 

 

 

 

char Data Type

 

 

 

 

 

 

x

charAt Method

x

 

 

 

 

 

 

charCodeAt Method

 

 

 

 

 

x

 

class Statement

 

 

 

 

 

 

x

Comma Operator (,)

x

 

 

 

 

 

 

// (Single-line Comment Statement)

x

 

 

 

 

 

 

/*..*/ (Multiline Comment Statement)

x

 

 

 

 

 

 

Comparison Operators

x

 

 

 

 

 

 

compile Method

 

 

x

 

 

 

 

concat Method (Array)

 

 

x

 

 

 

 

concat Method (String)

 

 

x

 

 

 

 

Conditional Compilation

 

 

x

 

 

 

 

Conditional Compilation Variables

 

 

x

 

 

 

 

Conditional (ternary) Operator (?:)

x

 

 

 

 

 

 

const Statement

 

 

 

 

 

 

x

constructor Property

 

x

 

 

 

 

 

continue Statement

x

 

 

 

 

 

 

cos Method

x

 

 

 

 

 

 

Data Type Conversion

 

 

x

 

 

 

 

Date Object

x

 

 

 

 

 

 

@debug Directive

 

 

 

 

 

 

x

debugger Statement

 

 

x

 

 

 

 

decimal Data Type

 

 

 

 

 

 

x

decodeURI Method

 

 

 

 

 

x

 

decodeURIComponent Method

 

 

 

 

 

x

 

Decrement Operator (--)

x

 

 

 

 

 

 

delete Operator

 

 

x

 

 

 

 

description Property

 

 

 

 

x

 

 

dimensions Method

 

 

x

 

 

 

 

Division Operator (/)

x

 

 

 

 

 

 

Division Assignment Operator (/=)

x

 

 

 

 

 

 

do...while Statement

 

 

x

 

 

 

 

double Data Type

 

 

 

 

 

 

x

E Property

x

 

 

 

 

 

 

encodeURI Method

 

 

 

 

 

x

 

encodeURIComponent Method

 

 

 

 

 

x

 

enum Statement

 

 

 

 

 

 

x

Enumerator Object

 

 

x

 

 

 

 

Equality Operator (==)

x

 

 

 

 

 

 

Error Object

 

 

 

 

x

 

 

escape Method

x

 

 

 

 

 

 

eval Method

x

 

 

 

 

 

 

exec Method

 

 

x

 

 

 

 

exp Method

x

 

 

 

 

 

 

expando Modifier

 

 

 

 

 

 

x

false Literal

x

 

 

 

 

 

 

final Modifier

 

 

 

 

 

 

x

fixed Method

x

 

 

 

 

 

 

float Data Type

 

 

 

 

 

 

x

floor Method

x

 

 

 

 

 

 

fontcolor Method

x

 

 

 

 

 

 

fontsize Method

x

 

 

 

 

 

 

for Statement

x

 

 

 

 

 

 

for...in Statement

 

 

 

 

x

 

 

fromCharCode Method

 

 

x

 

 

 

 

function get Statement

 

 

 

 

 

 

x

Function Object

 

x

 

 

 

 

 

function set Statement

 

 

 

 

 

 

x

function Statement

x

 

 

 

 

 

 

getDate Method

x

 

 

 

 

 

 

getDay Method

x

 

 

 

 

 

 

getFullYear Method

 

 

x

 

 

 

 

getHours Method

x

 

 

 

 

 

 

getItem Method

 

 

x

 

 

 

 

getMilliseconds Method

 

 

x

 

 

 

 

getMinutes Method

x

 

 

 

 

 

 

getMonth Method

x

 

 

 

 

 

 

GetObject Function

 

 

x

 

 

 

 

getSeconds Method

x

 

 

 

 

 

 

getTime Method

x

 

 

 

 

 

 

getTimezoneOffset Method

x

 

 

 

 

 

 

getUTCDate Method

 

 

x

 

 

 

 

getUTCDay Method

 

 

x

 

 

 

 

getUTCFullYear Method

 

 

x

 

 

 

 

getUTCHours Method

 

 

x

 

 

 

 

getUTCMilliseconds Method

 

 

x

 

 

 

 

getUTCMinutes Method

 

 

x

 

 

 

 

getUTCMonth Method

 

 

x

 

 

 

 

getUTCSeconds Method

 

 

x

 

 

 

 

getVarDate Method

 

 

x

 

 

 

 

getYear Method

x

 

 

 

 

 

 

Global Object

 

 

x

 

 

 

 

global Property

 

 

 

 

 

x

 

Greater than Operator (>)

x

 

 

 

 

 

 

Greater than or equal to Operator (>=)

x

 

 

 

 

 

 

hasOwnProperty Method

 

 

 

 

 

x

 

hide Modifier

 

 

 

 

 

 

x

@if Statement

 

 

x

 

 

 

 

if...else Statement

x

 

 

 

 

 

 

ignoreCase Property

 

 

 

 

 

x

 

import Statement

 

 

 

 

 

 

x

in Operator

x

 

 

 

 

 

 

Increment Operator (++)

x

 

 

 

 

 

 

index Property

 

 

x

 

 

 

 

indexOf Method

x

 

 

 

 

 

 

Inequality Operator (!=)

x

 

 

 

 

 

 

Infinity Property

 

 

x

 

 

 

 

input Property ($_)

 

 

x

 

 

 

 

instanceof Operator

 

 

 

 

x

 

 

int Data Type

 

 

 

 

 

 

x

interface Statement

 

 

 

 

 

 

x

internal Modifier

 

 

 

 

 

 

x

isFinite Method

 

 

x

 

 

 

 

isNaN Method

x

 

 

 

 

 

 

isPrototypeOf Method

 

 

 

 

 

x

 

italics Method

x

 

 

 

 

 

 

item Method

 

 

x

 

 

 

 

JScript Data Types

 

 

 

 

 

 

x

join Method

 

x

 

 

 

 

 

Labeled Statement

 

 

x

 

 

 

 

lastIndex Property

 

 

x

 

 

 

 

lastIndexOf Method

x

 

 

 

 

 

 

lastMatch Property($&)

 

 

 

 

 

x

 

lastParen Property ($+)

 

 

 

 

 

x

 

lbound Method

 

 

x

 

 

 

 

leftContext Property ($`)

 

 

 

 

 

x

 

Left Shift Assignment Operator (<<=)

x

 

 

 

 

 

 

length Property (arguments)

 

 

 

 

 

x

 

length Property (Array)

 

x

 

 

 

 

 

length Property (Function)

 

x

 

 

 

 

 

length Property (String)

x

 

 

 

 

 

 

Less than Operator (<)

x

 

 

 

 

 

 

Less than or equal to Operator (<=)

x

 

 

 

 

 

 

link Method

x

 

 

 

 

 

 

LN2 Property

x

 

 

 

 

 

 

LN10 Property

x

 

 

 

 

 

 

localeCompare Method

 

 

 

 

 

x

 

log Method

x

 

 

 

 

 

 

LOG2E Property

x

 

 

 

 

 

 

LOG10E Property

x

 

 

 

 

 

 

Logical AND Operator (&&)

x

 

 

 

 

 

 

Logical NOT Operator (!)

x

 

 

 

 

 

 

Logical OR Operator (||)

x

 

 

 

 

 

 

long Data Type

 

 

 

 

 

 

x

match Method

 

 

x

 

 

 

 

Math Object

x

 

 

 

 

 

 

max Method

x

 

 

 

 

 

 

MAX_VALUE Property

 

x

 

 

 

 

 

message Property

 

 

 

 

 

x

 

min Method

x

 

 

 

 

 

 

MIN_VALUE Property

 

x

 

 

 

 

 

Modulus Operator (%)

x

 

 

 

 

 

 

Modulus Assignment Operator (%=)

x

 

 

 

 

 

 

moveFirst Method

 

 

x

 

 

 

 

moveNext Method

 

 

x

 

 

 

 

multiline Property

 

 

 

 

 

x

 

Multiplication Operator (*)

x

 

 

 

 

 

 

Multiplication Assignment Operator (*=)

x

 

 

 

 

 

 

name Property

 

 

 

 

 

x

 

NaN Property (Global)

 

 

x

 

 

 

 

NaN Property (Number)

 

x

 

 

 

 

 

NEGATIVE_INFINITY Property

 

x

 

 

 

 

 

new Operator

x

 

 

 

 

 

 

Nonidentity Operator (!==)

x

 

 

 

 

 

 

null Literal

x

 

 

 

 

 

 

Number Data Type

 

 

 

 

 

 

x

Number Object

 

x

 

 

 

 

 

number Property

 

 

 

 

x

 

 

Object Object

 

 

x

 

 

 

 

Operator Precedence

x

 

 

 

 

 

 

override Modifier

 

 

 

 

 

 

x

package Statement

 

 

 

 

 

 

x

parse Method

x

 

 

 

 

 

 

parseFloat Method

x

 

 

 

 

 

 

parseInt Method

x

 

 

 

 

 

 

PI Property

x

 

 

 

 

 

 

pop Method

 

 

 

 

 

x

 

@position Directive

 

 

 

 

 

 

x

POSITIVE_INFINITY Property

 

x

 

 

 

 

 

pow Method

x

 

 

 

 

 

 

print Statement

 

 

 

 

 

 

x

private Modifier

 

 

 

 

 

 

x

propertyIsEnumerable Property

 

 

 

 

 

x

 

protected Modifier

 

 

 

 

 

 

x

prototype Property

 

x

 

 

 

 

 

public Modifier

 

 

 

 

 

 

x

push Method

 

 

 

 

 

x

 

random Method

x

 

 

 

 

 

 

RegExp Object

 

 

x

 

 

 

 

Regular Expression Object

 

 

x

 

 

 

 

Regular Expression Syntax

 

 

x

 

 

 

 

replace Method

x

 

 

 

 

 

 

return Statement

x

 

 

 

 

 

 

reverse Method

 

x

 

 

 

 

 

rightContext Property ($')

 

 

 

 

 

x

 

Right Shift Assignment Operator (>>=)

x

 

 

 

 

 

 

round Method

x

 

 

 

 

 

 

sbyte Data Type

 

 

 

 

 

 

x

ScriptEngine Function

 

x

 

 

 

 

 

ScriptEngineBuildVersion Function

 

x

 

 

 

 

 

ScriptEngineMajorVersion Function

 

x

 

 

 

 

 

ScriptEngineMinorVersion Function

 

x

 

 

 

 

 

search Method

 

 

x

 

 

 

 

@set Statement

 

 

x

 

 

 

 

setDate Method

x

 

 

 

 

 

 

setFullYear Method

 

 

x

 

 

 

 

setHours Method

x

 

 

 

 

 

 

setMilliseconds Method

 

 

x

 

 

 

 

setMinutes Method

x

 

 

 

 

 

 

setMonth Method

x

 

 

 

 

 

 

setSeconds Method

x

 

 

 

 

 

 

setTime Method

x

 

 

 

 

 

 

setUTCDate Method

 

 

x

 

 

 

 

setUTCFullYear Method

 

 

x

 

 

 

 

setUTCHours Method

 

 

x

 

 

 

 

setUTCMilliseconds Method

 

 

x

 

 

 

 

setUTCMinutes Method

 

 

x

 

 

 

 

setUTCMonth Method

 

 

x

 

 

 

 

setUTCSeconds Method

 

 

x

 

 

 

 

setYear Method

x

 

 

 

 

 

 

shift Method

 

 

 

 

 

x

 

short Data Type

 

 

 

 

 

 

x

sin Method

x

 

 

 

 

 

 

slice Method (Array)

 

 

x

 

 

 

 

slice Method (String)

 

 

x

 

 

 

 

small Method

x

 

 

 

 

 

 

sort Method

 

x

 

 

 

 

 

source Property

 

 

x

 

 

 

 

splice Method

 

 

 

 

 

x

 

split Method

 

 

x

 

 

 

 

sqrt Method

x

 

 

 

 

 

 

SQRT1_2 Property

x

 

 

 

 

 

 

SQRT2 Property

x

 

 

 

 

 

 

static Modifier

 

 

 

 

 

 

x

static Statement

 

 

 

 

 

 

x

Strict Equality Operator (===)

x

 

 

 

 

 

 

strike Method

x

 

 

 

 

 

 

String Data Type

 

 

 

 

 

 

x

String Object

x

 

 

 

 

 

 

sub Method

x

 

 

 

 

 

 

substr Method

 

 

x

 

 

 

 

substring Method

x

 

 

 

 

 

 

Subtraction Operator (-)

x

 

 

 

 

 

 

Subtraction Assignment Operator (-=)

x

 

 

 

 

 

 

sup Method

x

 

 

 

 

 

 

super Statement

 

 

 

 

 

 

x

switch Statement

 

 

x

 

 

 

 

tan Method

x

 

 

 

 

 

 

test Method

 

 

x

 

 

 

 

this Statement

x

 

 

 

 

 

 

throw Statement

 

 

 

 

x

 

 

toArray Method

 

 

x

 

 

 

 

toDateString Method

 

 

 

 

 

x

 

toExponential Method

 

 

 

 

 

x

 

toFixed Method

 

 

 

 

 

x

 

toGMTString Method

x

 

 

 

 

 

 

toLocaleDateString Method

 

 

 

 

 

x

 

toLocaleLowerCase Method

 

 

 

 

 

x

 

toLocaleString Method

x

 

 

 

 

 

 

toLocaleTimeString Method

 

 

 

 

 

x

 

toLocaleUpperCase Method

 

 

 

 

 

x

 

toLowerCase Method

x

 

 

 

 

 

 

toPrecision Method

 

 

 

 

 

x

 

toString Method

 

x

 

 

 

 

 

toTimeString Method

 

 

 

 

 

x

 

toUpperCase Method

x

 

 

 

 

 

 

toUTCString Method

 

 

x

 

 

 

 

true Literal

x

 

 

 

 

 

 

try...catch...finally Statement

 

 

 

 

x

 

 

Type Annotation

 

 

 

 

 

 

x

Type Conversion

 

 

 

 

 

 

x

typeof Operator

x

 

 

 

 

 

 

ubound Method

 

 

x

 

 

 

 

uint Data Type

 

 

 

 

 

 

x

ulong Data Type

 

 

 

 

 

 

x

Unary Negation Operator (-)

x

 

 

 

 

 

 

undefined Property

 

 

 

 

 

x

 

unescape Method

x

 

 

 

 

 

 

unshift Method

 

 

 

 

 

x

 

Unsigned Right Shift Operator (>>>)

x

 

 

 

 

 

 

Unsigned Right Shift Assignment Operator (>>>=)

x

 

 

 

 

 

 

ushort Data Type

 

 

 

 

 

 

x

UTC Method

x

 

 

 

 

 

 

valueOf Method

 

x

 

 

 

 

 

var Statement

x

 

 

 

 

 

 

VBArray Object

 

 

x

 

 

 

 

void Operator

 

x

 

 

 

 

 

while Statement

x

 

 

 

 

 

 

with Statement

x

 

 

 

 

 

 

See Also

Concepts

What's New in JScript 10.0?

Other Resources

JScript Reference