What's the difference between JavaScript and JScript?

JavascriptJscript

Javascript Problem Overview


I have always wondered WHaT tHE HecK?!? is the difference between JScript and JavaScript.

Javascript Solutions


Solution 1 - Javascript

Just different names for what is really ECMAScript. John Resig has a good explanation.

Here's the full version breakdown:

  • IE 6-7 support JScript 5 (which is equivalent to ECMAScript 3, JavaScript 1.5)

  • IE 8 supports JScript 6 (which is equivalent to ECMAScript 3, JavaScript 1.5 - more bug fixes over JScript 5)

  • Firefox 1.0 supports JavaScript 1.5 (ECMAScript 3 equivalent)

  • Firefox 1.5 supports JavaScript 1.6 (1.5 + Array Extras + E4X + misc.)

  • Firefox 2.0 supports JavaScript 1.7 (1.6 + Generator + Iterators + let + misc.)

  • Firefox 3.0 supports JavaScript 1.8 (1.7 + Generator Expressions + Expression Closures + misc.)

  • The next version of Firefox will support JavaScript 1.9 (1.8 + To be determined)

  • Opera supports a language that is equivalent to ECMAScript 3 + Getters and Setters + misc.

  • Safari supports a language that is equivalent to ECMAScript 3 + Getters and Setters + misc.

Solution 2 - Javascript

As far as I can tell, two things:

  1. ActiveXObject constructor
  2. The idiom f(x) = y, which is roughly equivalent to f[x] = y.

Solution 3 - Javascript

From Wikipedia: http://en.wikipedia.org/wiki/Jscript

> JScript is the Microsoft dialect of > the ECMAScript scripting language > specification. > > JavaScript (the Netscape/Mozilla > implementation of the ECMA > specification), JScript, and > ECMAScript are very similar languages. > In fact the name "JavaScript" is often > used to refer to ECMAScript or > JScript.

Microsoft uses the name JScript for its implementation to avoid trademark issues (JavaScript is a trademark of Oracle Corporation).

Solution 4 - Javascript

JScript is Microsoft's implementation of the ECMAScript specification. JavaScript is the Mozilla implementation of the specification.

Solution 5 - Javascript

Javascript, the language, came first, from Netscape.

Microsoft reverse engineered Javascript and called it JScript to avoid trademark issues with Sun. (Netscape and Sun were partnered up at the time, so this was less of an issue)

The languages are identical, both are dialects of ECMA script, the after-the-fact standard.

Although the languages are identical, since JScript runs in Internet Explorer, it has access to different objects exposed by the browser (such as ActiveXObject)

Solution 6 - Javascript

JScript is the Microsoft implementation of Javascript

Solution 7 - Javascript

According to this article:

  • JavaScript is a scripting language developed by Netscape Communications designed for developing client and server Internet applications. Netscape Navigator is designed to interpret JavaScript embedded into Web pages. JavaScript is independent of Sun Microsystem's Java language.

  • Microsoft JScript is an open implementation of Netscape's JavaScript. JScript is a high-performance scripting language designed to create active online content for the World Wide Web. JScript allows developers to link and automate a wide variety of objects in Web pages, including ActiveX controls and Java programs. Microsoft Internet Explorer is designed to interpret JScript embedded into Web pages.

Solution 8 - Javascript

Long time ago, all browser providers were making JavaScript engines for their browsers and only they and god knew what was happening inside this. One beautiful day, ECMA international came and said: let's make engines based on common standard, let's make something general to make life more easy and fun, and they made that standard. Since all browser providers make their JavaScript engines based on ECMAScript core (standard).

For example, Google Chrome uses V8 engine and this is open source. You can download it and see how C++ program translates a command 'print' of JavaScript to machine code.

Internet Explorer uses JScript (Chakra) engine for their browser and others do so and they all uses common core.

Solution 9 - Javascript

There are some code differences to be aware of.

A negative first parameter to subtr is not supported, e.g. in Javascript: "string".substr(-1) returns "g", whereas in JScript: "string".substr(-1) returns "string"

It's possible to do "string"[0] to get "s" in Javascript, but JScript doesn't support such a construct. (Actually, only modern browsers appear to support the "string"[0] construct.

Solution 10 - Javascript

Wikipedia has this to say about the differences.

In general JScript is an ActiveX scripting language that is probably interpreted as JavaScript by non-IE browsers.

Solution 11 - Javascript

Jscript is a .NET language similar to C#, with the same capabilities and access to all the .NET functions.

JavaScript is run on the ASP Classic server. Use Classic ASP to run the same JavaScript that you have on the Client (excluding HTML5 capabilities). I only have one set of code this way for most of my code.

I run .ASPX JScript when I require Image and Binary File functions, (among many others) that are not in Classic ASP. This code is unique for the server, but extremely powerful.

Solution 12 - Javascript

JScript is Microsoft's equivalent of JavaScript.
Java is an Oracle product and used to be a Sun product.

Oracle bought Sun.

JavaScript + Microsoft = JScript

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBrian GView Question on Stackoverflow
Solution 1 - JavascriptZachView Answer on Stackoverflow
Solution 2 - JavascriptPatrickView Answer on Stackoverflow
Solution 3 - JavascriptcasademoraView Answer on Stackoverflow
Solution 4 - JavascriptThomas OwensView Answer on Stackoverflow
Solution 5 - JavascriptAlan StormView Answer on Stackoverflow
Solution 6 - JavascriptJames BootherView Answer on Stackoverflow
Solution 7 - JavascriptChristophe HerremanView Answer on Stackoverflow
Solution 8 - JavascriptAlexander GharibashviliView Answer on Stackoverflow
Solution 9 - JavascriptShirazView Answer on Stackoverflow
Solution 10 - JavascripterlandoView Answer on Stackoverflow
Solution 11 - JavascriptClifView Answer on Stackoverflow
Solution 12 - Javascriptraven myersView Answer on Stackoverflow