148 questions
0
votes
4
answers
364
views
How to feature test for BigInt support?
I'm not familiar with modern JS and tooling to even try something.
References:
https://github.com/tc39/proposal-bigint
2
votes
1
answer
248
views
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 ...
1
vote
1
answer
82
views
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 ...
4
votes
2
answers
779
views
BigInt and Number coercion by numeric comparison operators
Will numeric comparison, between a BigInt and a Number, coerce one argument to BigInt, or coerce one argument to Number?
For example, in the following, is 3n coerced to 3, or is 1 coerced to 1n?
...
5
votes
2
answers
131
views
What is the purpose of classScope in the ECMAScript specification?
I was reading the steps in the specification (12th edition) that occur when a class declaration or expression is used, and saw that it starts off by creating a class scope at section 15.7.7 Runtime ...
-2
votes
1
answer
67
views
How do I build a Regexp that doesn't care about positions
I'm making a Scrabble game with HTML and Javascript and I'd like to add a "hint word" feature based on the player's rack.
I have a dictionary array with the valid words, and I need to test ...
0
votes
1
answer
147
views
Javascript Environment Record, is it an Exotic Object?
Are the environment record and exotic object creation procedures the same?
i.e. creation of a basic object with different internal slots and methods, than that of an ordinary object?
Are both objects ...
2
votes
1
answer
127
views
Is there a mistake in ECMAScript spec relating to Unicode code points?
In The Syntactic Grammar it says that
When a stream of code points is to be parsed as an ECMAScript Script or Module, it is first converted to a stream of input elements by repeated application of ...
1
vote
2
answers
69
views
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 ...
1
vote
0
answers
205
views
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 ...
1
vote
1
answer
65
views
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
1
vote
2
answers
191
views
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 ...
2
votes
1
answer
215
views
confusion in ecmascript productions
I've been confused lately about productions in ecma262 spec.
There are productions based on my assumption that can be other productions.
for example, Statement
Statement can be a Block it can also be ...
2
votes
3
answers
362
views
assignment expression in ecma262
consider the following code
var myVar = 'Hola';
{
let myVar;
myVar = 'Hello'
}
on line 4(myVar = 'Hello') we are using the Assignment operator
Now when i was looking at ecma262 in ...
1
vote
1
answer
79
views
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 ?