JScript is the Microsoft dialect of the ECMAScript scripting language specification.
JScript is implemented as a Windows Script engine.[1] JScript was first supported in Internet Explorer 3.0 browser released in August 1996. The typical file extension of JScript source code files is .js.
The most recent version of JScript is JScript .NET, which is based on the yet-unfinished edition 4 of the ECMAScript standard, and can be compiled for the Microsoft .NET platform. JScript.NET adds several new features to ECMAScript ed. 3, such as optional static type annotations.
Versions
JScript
The original JScript is an Active Scripting engine. Like other Active Scripting languages, it is built on the COM/OLE Automation platform and provides scripting capabilities to host applications. This is the version used when hosting JScript inside a Web page displayed by Internet Explorer, in an HTML application, in classic ASP, in Windows Script Host scripts and several other Automation environments. JScript is sometimes referred to as "classic JScript" or "Active Scripting JScript" to differentiate it from newer .NET-based versions.
Some versions of JScript are available for multiple versions of Internet Explorer and Windows. For example, JScript 5.7 was introduced with Internet Explorer 7.0 and is also installed for Internet Explorer 6.0 with Windows XP Service Pack 3, while JScript 5.8 was introduced with Internet Explorer 8.0 and is also installed with Internet Explorer 6.0 on Windows Mobile 6.5.
Note (1): JScript supports various features not specified in the ECMA standard[3], as does JavaScript.
Note (2): JScript 3.0 is "the first scripting language to fully conform to the ECMA-262 standard" (Source: Microsoft PressPass)
Note (3): JScript 5.7 includes an implementation of the ECMAScript Compact Profile (ECMA-327) which turns off features not required by the ES-CP when using the "JScript.Compact" ProgID.
JScript is also available on Windows CE (included in Windows Mobile, optional in Windows Embedded CE). The Windows CE version lacks Active Debugging.
(Source: MSDN, WebmasterWorld Forum)
JScript .NET
Main article:
JScript .NET
JScript .NET is a Microsoft .NET implementation of JScript, it is a CLS language and thus inherit very powerful features, but lacks many features of the original JScript language, making it inappropriate for many scripting scenarios. JScript .NET can be used for ASP.NET pages and for complete .NET applications, but the lack of support for this language in Microsoft Visual Studio place it more as an upgrade path for classic ASP using classic JScript than as a new first-class language.
Note (4): JScript .NET is "being developed in conjunction with ECMAScript Edition 4" (Source: MSDN)
JScript .NET is not supported in the .NET Compact Framework.
Note: JScript .NET versions are not related to classic JScript versions. JScript .NET is a separate product. Even though JScript .NET is not supported within the Visual Studio IDE, its versions are in sync with other .NET languages versions (C#, VB.NET, VC++) that follows their corresponding Visual Studio versions.
.NET Framework 3.0 and 3.5 are built on top of 2.0 and do not include newer releases of JScript .NET.
(Source: file version of Microsoft.JScript.dll in each framework install)
Differences from JavaScript
JScript supports the conditional comment, but JavaScript does not.
Other subtle differences exist, like the different behaviors that some methods exhibit (for example the RegExp methods).
Among other internal implementation differences, JScript uses non-generational mark-and-sweep garbage collection[4] whereas SpiderMonkey (the original implementation of JavaScript) uses a generational mark-and-sweep system[clarification needed].
See also
Notes
External links