Questions tagged [ecma262]

ECMA-262 is a Standard defining the ECMAScript scripting language also known as JavaScript.

ECMA-262 is a Standard defining the ECMAScript scripting language also known as JavaScript. For complete reference read the standard it self at: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

145 questions
541
votes
15 answers

What is the difference between JavaScript and ECMAScript?

What's the difference between ECMAScript and JavaScript? From what I've deduced, ECMAScript is the standard and JavaScript is the implementation. Is this correct?
Guy
  • 65,082
  • 97
  • 254
  • 325
225
votes
4 answers

Why was the arguments.callee.caller property deprecated in JavaScript?

Why was the arguments.callee.caller property deprecated in JavaScript? It was added and then deprecated in JavaScript, but it was omitted altogether by ECMAScript. Some browser (Mozilla, IE) have always supported it and don't have any plans on the…
pcorcoran
  • 7,894
  • 6
  • 28
  • 26
218
votes
10 answers

JSON left out Infinity and NaN; JSON status in ECMAScript?

Any idea why JSON left out NaN and +/- Infinity? It puts Javascript in the strange situation where objects that would otherwise be serializable, are not, if they contain NaN or +/- infinity values. Looks like this has been cast in stone: see RFC4627…
Jason S
  • 184,598
  • 164
  • 608
  • 970
98
votes
11 answers

Why is there no OFFICIAL JavaScript reference?

I tried to search for a JavaScript reference, but there's none available. The best two suggested sources are MDN (Mozilla Developer Network) and ECMA (https://262.ecma-international.org/12.0/) Why?
huy
  • 4,782
  • 6
  • 36
  • 42
96
votes
7 answers

Is there any way to check if strict mode is enforced?

Is there anyway to check if strict mode 'use strict' is enforced , and we want to execute different code for strict mode and other code for non-strict mode. Looking for function like isStrictMode();//boolean
Deepak Patil
  • 3,419
  • 3
  • 25
  • 22
87
votes
3 answers

Can I disable ECMAscript strict mode for specific functions?

I don't find anything about my question here on MDC or the ECMAscript specifications. Probably somebody knows a more 'hacky' way to solve this. I'm calling "use strict" on every javascript file in my environment. All my files start like…
jAndy
  • 231,737
  • 57
  • 305
  • 359
55
votes
9 answers

Is ECMAScript really a dialect of Lisp?

A friend of mine drew my attention the welcome message of 4th European Lisp Symposium: ... implementation and application of any of the Lisp dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP, Dylan, Clojure, ACL2,…
Emre Sevinç
  • 8,211
  • 14
  • 64
  • 105
49
votes
2 answers

Javascript IN operator compatibility

Can someone tell me since which ECMA version the IN operator is available and which browsers (versions) support it ? Explanation: The IN-operator can be used like the following: var myObject = { Firstname: 'Foo', Lastname:…
jAndy
  • 231,737
  • 57
  • 305
  • 359
42
votes
4 answers

In ECMAScript5, what's the scope of "use strict"?

What scope does the strict mode pragma have in ECMAScript5? "use strict"; I'd like to do this (mainly because JSLint doesn't complain about it): "use strict"; (function () { // my stuff here... }()); But I'm not sure if that would break other…
Stephen Sorensen
  • 11,455
  • 13
  • 33
  • 46
41
votes
9 answers

Are there any .NET CLR/DLR implementations of ECMAScript?

Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR? Ideally something like what Rhino is for Java. A solid port of Rhino running on .NET Framework / Mono Framework would be perfect. I've only seen a…
mckamey
  • 17,359
  • 16
  • 83
  • 116
40
votes
3 answers

JavaScript: Can ECMAScript 5's Strict Mode ("use strict") be enabled using single quotes ('use strict')?

JavaScript doesn't care if your Strings are double-quoted "double" or single-quoted 'single'. Every example of ECMAScript 5's strict mode has it enabled by "use strict" in double-quotes. Can I do the following (single-quotes): alert(function(){ …
Rudiger
  • 411
  • 4
  • 5
37
votes
3 answers

Is JavaScript's double equals (==) always symmetric?

There are many cases in which JavaScript's type-coercing equality operator is not transitive. For example, see "JavaScript equality transitivity is weird." However, are there any cases in which == isn't symmetric? That is, where a == b is true and b…
Trevor Burnham
  • 76,828
  • 33
  • 160
  • 196
37
votes
1 answer

EcmaScript 5 browser implementation

So Safari and Chrome have started in their betas to implement some ES5 stuff. For instance Object.create is in them. Do any of you know if there is a website that shows the progress made in the browsers? ATM i need to use Object.freeze, and wanted…
hojberg
  • 1,074
  • 2
  • 9
  • 12
34
votes
4 answers

Which (javascript) environments support ECMAscript 5 strict mode? (aka "use strict")

ECMAScript 5 is in its final draft as I write this; It is due to include a strict mode which will prevent you from assigning to the global object, using eval, and other restrictions. (John Resig's Article is a good introduction.) This magical…
Sean McMillan
  • 10,058
  • 6
  • 55
  • 65
27
votes
4 answers

Activation and Variable Object in JavaScript?

Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point…
Benny Tjia
  • 4,853
  • 10
  • 39
  • 48
1
2 3
9 10