# JScript

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/JScript
> Markdown URL: https://mediated.wiki/source/JScript.md
> Source: https://en.wikipedia.org/wiki/JScript
> Source revision: 1346660035
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Not to be confused with [JavaScript](/source/JavaScript).

**JScript** is Microsoft's [legacy](/source/Legacy_system)[2] dialect of the [ECMAScript](/source/ECMAScript) standard[3] that is used in [Microsoft](/source/Microsoft)'s [Internet Explorer](/source/Internet_Explorer) web browser and [HTML Applications](/source/HTML_Application), and as a standalone Windows scripting language. It is [proprietary software](/source/Proprietary_software).

JScript is implemented as an [Active Scripting](/source/Active_Scripting) engine. This means that it can be "plugged in" to [OLE Automation](/source/OLE_Automation) applications that support Active Scripting, such as [Internet Explorer](/source/Internet_Explorer), [Active Server Pages](/source/Active_Server_Pages), and [Windows Script Host](/source/Windows_Script_Host).[4] It also means such applications can use multiple Active Scripting languages, e.g., JScript, [VBScript](/source/VBScript) or [PerlScript](/source/PerlScript).

JScript was first supported in the [Internet Explorer 3.0](/source/Internet_Explorer#Internet_Explorer_3) browser released in August 1996. Its most recent version is JScript 9.0, included in Internet Explorer 9.

JScript 10.0[5] is a separate dialect, also known as [JScript .NET](/source/JScript_.NET), which adds several new features from the abandoned fourth edition of the ECMAScript standard. It must be compiled for [.NET Framework](/source/.NET_Framework) version 2 or version 4, but static type annotations are optional.

JScript has been criticized for being insecure and having multiple security bugs "exploited by nation-state actors",[6] leading Microsoft to add an option to disable it.[7]

## Comparison to JavaScript

As explained by [Douglas Crockford](/source/Douglas_Crockford) in his talk titled *The JavaScript Programming Language* on YUI Theater,

[Microsoft] did not want to deal with [Sun Microsystems](/source/Sun_Microsystems) about the trademark issue, and so they called their implementation JScript. A lot of people think that JScript and JavaScript are different but similar languages. That's not the case. They are just different names for the same language, and the reason the names are different was to get around trademark issues.[8]

However, JScript supports conditional compilation, which allows a programmer to selectively execute code within [block comments](/source/Block_comments). This is an extension to the [ECMAScript](/source/ECMAScript) standard that is unsupported in other JavaScript implementations, thus making the above statement not fully true, although conditional compilation is no longer supported in Internet Explorer 11 Standards mode.

Other internal implementation differences between JavaScript and JScript, at some point in time, are noted on the [Microsoft Developer Network](/source/Microsoft_Developer_Network) (MSDN).[9] The default type value for the script element in Internet Explorer is JavaScript, while JScript was its alias.[10] In an apparent transition from JScript to JavaScript, online, the Microsoft Edge [Legacy] Developer Guide refers to the Mozilla MDN web reference library as its definitive documentation.[11] As of October 2017, Microsoft MSDN pages for scripting in Internet Explorer are being redirected there as well.[12] This information may not include JScript specific objects, such as Enumerator, which are listed in the JavaScript language reference on Microsoft Docs.[13] Those provide additional features that are not included in the ECMA Standards, whether they are supported in the [Edge \[Legacy\] browser](/source/Microsoft_Edge_Legacy) or its predecessor.[14]

## Versions

### JScript (COM Classic)

The original JScript is an [Active Scripting](/source/Active_Scripting) engine. Like other Active Scripting languages, it is built on the [COM/OLE Automation](/source/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](/source/Internet_Explorer), in an [HTML application](/source/HTA_(programming_language)) before [IE9](/source/Internet_Explorer_9), as well as in [classic ASP](/source/Active_Server_Pages), [Windows Script Host](/source/Windows_Script_Host) scripts and other [Automation](/source/OLE_Automation) environments.

JScript is sometimes referred to as "classic JScript" or "Active Scripting JScript" to differentiate it from newer [.NET](/source/.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](/source/Internet_Explorer_7).0 and is also installed for [Internet Explorer 6](/source/Internet_Explorer_6).0 with [Windows XP](/source/Windows_XP) [Service Pack 3](/source/XP_service_pack_3), while JScript 5.8 was introduced with [Internet Explorer 8](/source/Internet_Explorer_8).0 and is also installed with Internet Explorer 6.0 on [Windows Mobile 6.5](/source/Windows_Mobile#Windows_Mobile_6.5).

Microsoft's implementation of ECMAScript 5th Edition in [Windows 8 Consumer Preview](/source/Windows_8#Consumer_Preview) is called *JavaScript* and the corresponding [Visual Studio](/source/Visual_Studio) 11 Express Beta includes a "completely new", full-featured JavaScript editor with [IntelliSense](/source/IntelliSense) enhancements for [HTML5](/source/HTML5) and [ECMAScript 5](/source/ECMAScript_5) syntax, "VSDOC" annotations for multiple overloads, simplified [DOM](/source/Document_Object_Model) configuration, brace matching, collapsible outlining and "go to definition".[15]

Version Date Introduced with[16] Based on[note 1] Similar JavaScript version 1.0 Aug 1996 Internet Explorer 3.0 Netscape JavaScript 1.0 2.0 Jan 1997 Windows IIS 3.0 Netscape JavaScript 1.1 3.0 Oct 1997 Internet Explorer 4.0 ECMA-262 1st edition[note 2] 1.3 4.0 Visual Studio 6.0 (as part of Visual InterDev) ECMA-262 1st edition 1.3 5.0 Mar 1999 Internet Explorer 5.0 ECMA-262 2nd edition 1.4 5.1 Internet Explorer 5.01 ECMA-262 2nd edition 1.4 5.5 Jul 2000 Internet Explorer 5.5 & Windows CE 4.2 ECMA-262 3rd edition 1.5 5.6 Oct 2001 Internet Explorer 6.0 & Windows CE 5.0 ECMA-262 3rd edition 1.5 5.7 Nov 2006 Internet Explorer 7.0 ECMA-262 3rd edition[17] + ECMA-327 (ES-CP)[note 3] 1.5 5.8 Mar 2009 Internet Explorer 8.0 & Internet Explorer Mobile 6.0 ECMA-262 3rd edition + ECMA-327 (ES-CP)[note 3] + JSON (RFC 4627) 1.5 11.0 Jun 2024 Windows 11 version 24H2 (JScript 9 Legacy, designed as a compatible drop-in replacement for JScript 5.8, but not 100% compatible[18]) 1.5

JScript is also available on Windows CE (included in Windows Mobile, optional in Windows Embedded CE). The Windows CE version lacks Active Debugging.

### Managed JScript

Managed JScript is an implementation of JScript for the [Dynamic Language Runtime](/source/Dynamic_Language_Runtime), it is part of Microsoft's dynamic languages for .NET along with [IronRuby](/source/IronRuby), [IronPython](/source/IronPython), and [Dynamic Visual Basic](/source/Visual_Basic). Unlike JScript .NET, which is less dynamic than the original JScript but provides [Common Language Infrastructure](/source/Common_Language_Infrastructure) (CLI) compatibility, Managed JScript is designed on top of the [Dynamic Language Runtime](/source/Dynamic_Language_Runtime) (DLR) and provides the features needed for scripting scenarios.

While it is primarily designed to be used within [Silverlight](/source/Microsoft_Silverlight) and ASP.NET at this time, it can also easily be embedded within any .NET application.[19]

Two builds of Managed JScript exist: one for the Desktop [Common Language Runtime](/source/Common_Language_Runtime) (CLR) and one for the [Silverlight](/source/Microsoft_Silverlight) CoreCLR

Version Date Introduced with Based on Platform 1.0.0.0 2007 ASP.NET Futures (July 2007 preview) ECMA-262 3rd edition Desktop CLR 2.0 1.1.20625.0 2007 Microsoft Silverlight 1.1 Alpha (Sep 2007 refresh) ECMA-262 3rd edition CoreCLR 1.1

Managed JScript is unsupported in the [.NET Compact Framework](/source/.NET_Compact_Framework).

(Source: files versions of Microsoft.JScript.Runtime.dll in ASP.NET Futures and Silverlight 1.1 folders)

### JScript "Chakra" (JsRT)

See also: [Chakra (JScript engine)](/source/Chakra_(JScript_engine))

JScript "Chakra" is based on the JScript (COM classic) version, but it has been redesigned to improve performance in [Internet Explorer 9](/source/Internet_Explorer_9)[20] at the expense of proper Active Scripting engine compatibility. It requires a specific Microsoft JavaScript Hosting (JsRT) API for proper use. Therefore, it is installed side by side with JScript 5.x and is only used by [Internet Explorer 9](/source/Internet_Explorer_9) and later as well as JsRT hosts, while other Active Scripting hosts keep using the 5.x version when requesting the JScript engine.

Version Date Introduced with[21] Based on[22] Similar JavaScript version Chakra 9.0 Mar 2011 Internet Explorer 9.0 ECMA-262 5th edition 1.8.1 Chakra 10.0 Sep 2012 Internet Explorer 10.0 ECMA-262 5th edition Chakra 11.0 Oct 2013 Internet Explorer 11.0 ECMA-262 5th edition Chakra Edge Jul 2015 Edge [Legacy] / Windows 10 ECMA-262 5th to 9th (2018) edition (kept up to date without engine versioning)

There are two versions of the Chakra JsRT engine. The original one was used by [Internet Explorer 9](/source/Internet_Explorer_9) and later, and is sometimes referred to as "jscript9.dll" or "legacy Chakra engine", and a second one used by [Microsoft Edge Legacy](/source/Microsoft_Edge_Legacy) browser and sometimes referred to as "new Chakra engine", "Edge engine" or "Chakra.dll". Both Chakra JsRT versions can be used by other applications using the JsRT API and can be installed side by side.[23]

There is also a [COM Classic](#JScript_(COM_Classic)) version of Chakra internally called "JScript 9 Legacy" (provided by jscript9Legacy.dll), introduced with Windows 11 24H2, which brings back compatibility with Active Scripting hosts and intended as a compatible drop-in replacement for JScript 5.8. Although largely compatible with the original JScript 5.8, there are notable breaking differences.[24]

See separate page about new [Chakra (Edge) engine](/source/Chakra_(JavaScript_engine)).

### JScript .NET (CLI)

Main article: [JScript .NET](/source/JScript_.NET)

JScript .NET is a [Microsoft .NET](/source/Microsoft_.NET_strategy) implementation of JScript. It is a [CLI](/source/Common_Language_Infrastructure) language and thus inherits 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](/source/ASP.NET) pages and for complete .NET applications, but the lack of support for this language in Microsoft Visual Studio places it more as an upgrade path for classic [ASP](/source/Active_Server_Pages) using classic JScript than as a new first-class language.

Version Platform Date Introduced with Based on 7.0 Desktop CLR 1.0 2002-01-05 .NET Framework 1.0 ECMA-262 3rd edition[note 4] 7.1 Desktop CLR 1.1 2003-04-01 .NET Framework 1.1 ECMA-262 3rd edition[note 4] 8.0 Desktop CLR 2.0 2005-11-07 .NET Framework 2.0 ECMA-262 3rd edition[note 4] 10.0 Desktop CLR 4.0 2010-08-03 .NET Framework 4.0 ECMA-262 3rd edition[note 4]

JScript .NET is unsupported in the [.NET Compact Framework](/source/.NET_Compact_Framework).[citation needed]

JScript .NET versions are unrelated to classic JScript versions, and are a separate product line. Even though JScript .NET is unsupported within the Visual Studio IDE, its versions are in sync with other .NET languages versions ([C#](/source/C_Sharp_(programming_language)), [VB.NET](/source/VB.NET), [VC++](/source/VC%2B%2B)) that follow their corresponding Visual Studio versions.

.NET Framework 3.0 and 3.5 are built on 2.0 and do not include the newer JScript.NET release (version 10.0 for .NET Framework 4.0).

(Source: file version of jsc.exe JScript.NET compiler and Microsoft.JScript.dll installed with .NET Framework)

## See also

- [JScript.Encode](/source/JScript.Encode)
- [Windows Script File](/source/Windows_Script_File)
- [Windows Script Host](/source/Windows_Script_Host)
- [WinJS](/source/WinJS)

## Notes

1. JScript supports various features not specified in the ECMA standard,[25] as does JavaScript.

1. Microsoft said JScript 3.0 was "the first scripting language to fully conform to the ECMA-262 standard".[26]

1. 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.[citation needed]

1. JScript .NET is "being developed in conjunction with ECMAScript Edition 4".[27]

## References

1. ["Types of Script Files"](https://msdn.microsoft.com/en-us/library/67w03h17(v=VS.85).aspx). Msdn.microsoft.com. 24 October 2011. Retrieved 2012-08-17.

1. ["Disabling legacy scripting engine JScript in Internet Explorer"](https://techcommunity.microsoft.com/t5/windows-it-pro-blog/disabling-legacy-scripting-engine-jscript-in-internet-explorer/ba-p/1777563). *Techcommunity Microsoft. com*. 2020-10-13. Retrieved 2021-11-15.

1. ["JScript (ECMAScript3)"](https://msdn.microsoft.com/en-us/library/hbxc2t98(v=vs.85).aspx). Msdn.microsoft.com. 24 October 2011. Retrieved 2012-08-17.

1. ["What Is WSH?"](https://msdn.microsoft.com/en-us/library/shzd7dy4(v=VS.85).aspx). Msdn.microsoft.com. 24 October 2011. Retrieved 2012-08-17.

1. [What is JScript 10.0?](https://msdn.microsoft.com/en-us/library/xkx7dfw1.aspx)

1. Cimpanu, Catalin. ["Microsoft adds option to disable JScript in Internet Explorer"](https://www.zdnet.com/article/microsoft-adds-option-to-disable-jscript-in-internet-explorer/). *ZDNet*. Retrieved 2021-11-15.

1. ["Option to disable JScript execution in Internet Explorer"](https://support.microsoft.com/en-us/topic/option-to-disable-jscript-execution-in-internet-explorer-9e3b5ab3-8115-4650-f3d8-e496e7f8e40e). *support.microsoft.com*. Retrieved 2021-11-15.

1. Douglas Crockford, *The JavaScript Programming Language*

1. ["The World of JScript, JavaScript, ECMAScript"](https://blogs.msdn.microsoft.com/gauravseth/2007/08/15/the-world-of-jscript-javascript-ecmascript/). Blogs.msdn.microsoft.com. 15 August 2007. Retrieved 2017-10-21.

1. ["script element"](https://msdn.microsoft.com/en-us/library/ms535892(v=vs.85).aspx). Msdn.microsoft.com. Retrieved 2017-10-16.

1. ["Microsoft-Edge Dev-Guide"](https://docs.microsoft.com/en-us/microsoft-edge/dev-guide). Docs.microsoft.com. Retrieved 2017-10-18.

1. ["Documenting the Web Together"](https://blogs.windows.com/msedgedev/2017/10/18/documenting-web-together-mdn-web-docs/). Blogs.windows.com. 18 October 2017. Retrieved 2017-10-18.

1. ["Javascript Language Reference (Microsoft Docs)"](https://docs.microsoft.com/en-us/scripting/javascript/javascript-language-reference). Docs.microsoft.com. Retrieved 2017-10-18.

1. ["JavaScript Objects (Microsoft Docs)"](https://docs.microsoft.com/en-us/scripting/javascript/reference/javascript-objects). Docs.microsoft.com. Retrieved 2017-10-18.

1. ["What's New in ASP.NET 4.5 and Visual Web Developer 11 Beta: The Official Microsoft ASP.NET Site"](http://www.asp.net/vnext/overview/whitepapers/whats-new#_Toc318097407). 13 May 2022. ["What's New for ASP.NET 4.5 and Web Development in Visual Studio 11 Beta"](https://msdn.microsoft.com/en-us/library/hh420390(v=vs.110).aspx#javascript_editor). 12 May 2015.

1. ["Version Information (Windows Scripting – JScript)"](https://msdn.microsoft.com/en-us/library/s4esdbwz.aspx), Microsoft, retrieved 2010-05-31

1. Lakshman, Pratap. ["JScript Deviations from ES3"](http://regmedia.co.uk/2007/10/31/jscriptdeviationsfromes3.pdf). *The Register*. Situation Publishing / Microsoft. Retrieved 9 February 2020.

1. ["Windows 11 22H2 has a different way of using the JS engine? - Microsoft Q&A"](https://learn.microsoft.com/en-us/answers/questions/1071647/windows-11-22h2-has-a-different-way-of-using-the-j)

1. (Source: [JScript Blog](http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx), [Jim Hugunin's Thinking Dynamic blog](http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx), Source: [Blog of Jitu](http://blogs.msdn.com/jitu/archive/2007/05/04/introducing-managed-jscript.aspx))

1. Niyogi, Shanku (18 March 2010). ["The New JavaScript Engine in Internet Explorer 9"](https://docs.microsoft.com/en-us/archive/blogs/ie/the-new-javascript-engine-in-internet-explorer-9). *IEBlog (archives)*. Microsoft. Retrieved 19 February 2020.

1. ["Version Information (Windows Scripting – JScript)"](https://msdn.microsoft.com/en-us/library/s4esdbwz.aspx), Microsoft, retrieved 2010-05-31

1. ["Internet Explorer Standards Support Documents"](https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-iestandlp/8aea05e3-8c1e-4a9a-9614-31f71e679459). *Open Specifications (Microsoft Docs)*. Microsoft. Retrieved 19 February 2020.

1. ["Targeting Microsoft Edge vs. Legacy Engines in JsRT APIs"](https://docs.microsoft.com/en-us/microsoft-edge/hosting/chakra-hosting/targeting-edge-vs-legacy-engines-in-jsrt-apis). *Microsoft Edge documentation (Microsoft Docs)*. Microsoft. Retrieved 19 February 2020.

1. ["Windows 11 22H2 has a different way of using the JS engine? - Microsoft Q&A"](https://learn.microsoft.com/en-us/answers/questions/1071647/windows-11-22h2-has-a-different-way-of-using-the-j)

1. ["Microsoft JScript Features – Non-ECMA (Windows Scripting – JScript)"](https://msdn.microsoft.com/en-us/library/4tc5a343.aspx), Microsoft, retrieved 2010-05-31

1. ["Microsoft Embraces ECMA Internet Scripting Standard; Delivers Industry's First ECMA-Compliant Scripting Language, JScript 3.0, In Key Microsoft Products"](http://www.microsoft.com/presspass/press/1997/Jun97/jecmapr.mspx), Microsoft, 1997-06-30, [archived](https://web.archive.org/web/20090112221530/http://www.microsoft.com/presspass/press/1997/Jun97/jecmapr.mspx) 2009-01-12 at the Wayback Machine

1. ["What Is JScript .NET?"](https://msdn.microsoft.com/en-us/library/xkx7dfw1(VS.71).aspx), Microsoft

## External links

- [JScript documentation in the MSDN Library](http://msdn2.microsoft.com/en-us/library/hbxc2t98.aspx)
- [JScript 5.7 Release Notes](http://download.microsoft.com/download/f/f/e/ffea3abf-b55f-4924-b5a5-bde0805ad67c/Windows%20Script%20Release%20Notes.rtf)
- [JScript .NET documentation in the MSDN Library](http://msdn2.microsoft.com/en-us/library/72bd815a(vs.71).aspx)
- [JScript blog](http://blogs.msdn.com/jscript)
- [JavaScript – JScript – ECMAScript version history](http://www.webmasterworld.com/forum91/68.htm)
- [JScript Features – ECMA](http://msdn.microsoft.com/en-us/library/49zhkzs5(v=vs.100).aspx)
- [JScript Features – Non-ECMA](http://msdn.microsoft.com/en-us/library/894hfyb4(v=vs.100).aspx)
- [New features in JavaScript (Microsoft Docs)](http://docs.microsoft.com/en-us/scripting/javascript/what-s-new-in-javascript)

---
Adapted from the Wikipedia article [JScript](https://en.wikipedia.org/wiki/JScript) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/JScript?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
