9
@if (@_jscript_version == 10)
    document.write("You are using IE10");

According to Wikipedia IE10 will use JScript 10.

JScript 10 seems to have a whole bunch of new proprietary extensions to EcmaScript 5.

Is the version of the EcmaScript engine (10) in IE10 related to JScript 10.0 ?

Does IE10 bring in a whole load of proprietary extensions like strict typing, etc?

gen_Eric
  • 223,194
  • 41
  • 299
  • 337
Raynos
  • 166,823
  • 56
  • 351
  • 396

2 Answers2

5

Microsoft Reference

JScript 10.0 is used for applications that run on a server by using the .NET Framework. For information about how to write scripts that run on a client computer in a Web browser, see JScript (Windows Script Technologies).

It would appear they are just being annoying with version numbers. The JScript 10.0 seems to run on the .NET framework only.

Although I still don't know what "Jscript version 10" is and why it has the same version number as JScript 10.0

Raynos
  • 166,823
  • 56
  • 351
  • 396
3

It appears I was mistaken, and JScript 10.0 and JScript (in IE) with a version of 10 are entirely unrelated, and Microsoft's versioning schemes are abhorrent.

CassOnMars
  • 6,153
  • 2
  • 32
  • 47
  • 1
    more specific - he's asking about version, not just that jscript relates to ecmascript – fazo Jul 22 '11 at 14:50
  • See the second question. JScript 10.0 is a _very different_ language from JScript 9.0 and ES5. JScript 10.0 seems to build on JScript 7/8/.NET – Raynos Jul 22 '11 at 14:52
  • 1
    That second question wasn't there when I answered. – CassOnMars Jul 22 '11 at 14:53
  • @d_r_w so in IE10 I can have static types, and in IE9 I cannot? I've also taken a quote from microsoft stating JScript 10.0 is unrelated to web browsers, is that quote false? – Raynos Jul 22 '11 at 15:05
  • @Raynos Nope, you cannot have static types in IE10. IE10 just supports regular Javascript. You can have static types, access to .NET, etc., only if you compile JScript code with `jsc` (but then you'll get an `exe`/`dll` which can't be run in a web browser). I'm not sure but it seems that both Javascript in IE10 and JScript.NET are called "Jscript 10.0". – duri Jul 22 '11 at 15:16
  • 2
    +1 for versioning schemes are abhorrent. @duri that's really annoying, – Raynos Jul 22 '11 at 15:18