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
2
votes
1 answer

Why is the dollar sign no longer "intended for use only in mechanically generated code?"

In ECMA-262, 3rd edition[PDF], under section 7.6 ("Identifiers," page 26), we see the following note: The dollar sign is intended for use only in mechanically generated code. That seems reasonable. Many languages commonly used for generating or…
Dagg Nabbit
  • 75,346
  • 19
  • 113
  • 141
2
votes
2 answers

Details about what happens when entering a function declared in the global scope is missing from ECMAScript Specification v5?

The ECMAScript specification goes into detail about what happens when control enters the execution context of a function within a function. function foo() { function bar() { } bar(); // Control will be given to the bar function. Details…
contactmatt
  • 18,116
  • 40
  • 128
  • 186
2
votes
2 answers

Are all function declarations & expressions created by called new Function() behind the scenes?

I'm reading the portion of ECMA 262 v5 script that speaks of Function definitions. For both function declarations and function expressions, the following is mentioned: Return the result of creating a new Function object as specified in 13.2 The…
contactmatt
  • 18,116
  • 40
  • 128
  • 186
2
votes
1 answer

Does Eval really introduce dynamic scoping to JavaScript?

People say that Eval brings dynamic scope into JavaScript, but I don't see how that statement is valid. Using Eval evaluates the expression using the same lexical environment/variable environment as the calling environment (reference ECMA 262 v.…
contactmatt
  • 18,116
  • 40
  • 128
  • 186
2
votes
1 answer

Authoritative JavaScript validation to a standard

I am trying to validate the JavaScript on my website. The scripts do not throw any errors and run fine on Chrome and Firefox (latest stable version). However, the animated parts absolutely do not work on IE (9)[*1][*solved]. I have used jQuery and…
Lord Loh.
  • 2,437
  • 7
  • 39
  • 64
1
vote
9 answers

What scripting languages are similar to ECMA?

I am looking for an ECMAScript alternative to work as a scripting language for custom application logic. There are things I like about ECMA, especially the syntax for the newer spec(like AS3). Unfortunately, the AS3 engine is not open source to be…
Kekoa
  • 27,892
  • 14
  • 72
  • 91
1
vote
1 answer

Am I right about LexicalEnvironment and VariableEnvironment?

I read a lot of articles, I was very confused, I also read the ES6 official documentation. When creating an execution context, LE and VE initially point to the same Lexical Environment. But then the document says let and const declarations define…
1_sy
  • 29
  • 2
1
vote
1 answer

Understanding ECMAScript production parameterized annotations

I have been reading about how regular expressions are parsed in JS in this link: https://262.ecma-international.org/13.0/#sec-regular-expressions, but I don't quite understand what are the parameterized annotations [N] and [Sep]. Like in this…
renton
  • 21
  • 1
  • 5
1
vote
2 answers

What is the meaning of an alternative according to ecma262?

I've been wondering what's the meaning of "alternative" in ecma262. i've seen that the term "alternative" was used many times in the spec. here are some examples: quote taken from this section so, in this example, the nonterminal ForStatement…
AngryJohn
  • 576
  • 4
  • 10
1
vote
0 answers

How the evaluate operation works in ecmascript?

i've been wondering how the Evaluate operation works in ecmascript. so i've been learning about context-free grammer but i couldn't understand the exact steps when we evaluate a non-terminal symbol on the spec. take a look at the following…
AngryJohn
  • 576
  • 4
  • 10
1
vote
1 answer

Which nonterminal is the start symbol?

While i was reading the spec(ECMAScript 2022) i've wondered which nonterminal symbol is the start symbol ? in other words the first place that is being evaluated in ECMAScript 2022
AngryJohn
  • 576
  • 4
  • 10
1
vote
2 answers

function declarations cannot be inside an if statement according to ecmascript

how is it even possible to declare a function inside an IfStatement ? because according to the ecmascript spec only a Statement can be there. if ( Expression ) Statement if ( Expression ) Statement else Statement and FunctionDeclaration isn't a…
AngryJohn
  • 576
  • 4
  • 10
1
vote
1 answer

can someone explain to me what FunctionDeclarationInstantiation does according to ecma262?

i've been reading the ECMAScript spec(ecma262) quite a bit lately. and i find the FunctionDeclarationInstantiation abstract operation to be complicated. can someone explain to me what it does ?
AngryJohn
  • 576
  • 4
  • 10
1
vote
0 answers

What is the "list-separator String appropriate for the host environment’s current locale" in JavaScript (ECMAScript)

While reading the ECMAScript 2015 Language Specification, I came across the following step in the Array.prototype.toLocaleString method: Let separator be the String value for the list-separator String appropriate for the host environment’s current…
MangaD
  • 315
  • 4
  • 12
1
vote
0 answers

What does “a relation is least” mean?

In the ECMAScript spec, it says: A Relation is least with respect to some conditions when it is the smallest Relation that satisfies those conditions. To be honest, I do not really understand the meaning of this sentence. Can you provide examples…
MaximPro
  • 563
  • 8
  • 21