Skip to main content

Questions tagged [ecmascript]

ECMAScript is the scripting language standardized by Ecma International in the ECMA-262 specification and ISO/IEC 16262.

1 vote
2 answers
324 views

I am trying to wrap my head around what the ECMAScript specification suggests about variable assignment. Introduction: Coming from Java, this is pretty straight forward. Variables get stored at a ...
tweekz's user avatar
  • 237
0 votes
2 answers
548 views

Coming from languages like C++, Java or PHP I've learned that there are Value Types and Reference Types. Value Types store values directly in the variable (in a box / memory location). Whereas ...
tweekz's user avatar
  • 237
0 votes
2 answers
220 views

When reading through the ECMAScript specification, I noticed, it actually never mentions concepts like "pass by value" or "pass by reference". When looking at the assignment ...
tweekz's user avatar
  • 237
6 votes
2 answers
591 views

I'm not a frontend dev, but I recall that a few years ago, the this keyword was commonplace in frontend codebases. In recent years, I haven't seen this get used anymore. In the last few frontend ...
Newb's user avatar
  • 178
3 votes
1 answer
584 views

I've been told on StackOverflow this questions was off-topic so I'm asking here: From this webpage (ISO/IEC 22275:2018): This International Standard defines the ECMAScript Specification Suite ...
Hugh's user avatar
  • 141
2 votes
1 answer
96 views

I am writing a client to talk to a server API in JavaScript. I have an OOP background but am trying to embrace modern EcmaScript. So I started with this: customerApi.js: const baseUrl = "http://...
user210757's user avatar
0 votes
0 answers
154 views

I've recently learned that setTimeout is not part of Ecma 262 standard but takes part of WhatWG one. I have one misunderstanding concerning these two standards and I can't get how they converge. For ...
mfrachet's user avatar
  • 1,591
4 votes
2 answers
4k views

I've written a bit of code that looks like this: async function fetchData() { const json = await fetch(ENDPOINT + key.key).then(data => data.json()); //Do something with the data } It's ...
dwjohnston's user avatar
  • 2,769
3 votes
1 answer
851 views

The question is related to the resolution of the this operator in Javascript classes. NodeJS now supports ES6 classes. The problem faced during this is that when a new instance of the class is created ...
Manish M Demblani's user avatar
1 vote
1 answer
94 views

We've built a class that allows you to easily draw stuff on a <canvas> element. That class is called Canvas. I've encapsulated the <canvas> element and the class itself in a WebComponent, ...
nicholaswmin's user avatar
  • 2,134
1 vote
2 answers
104 views

I am trying to build a derivation tree for the program x = 42 using the specification for ECMAScript 2017. I see that there there is an AssignmentExpression which has the production rule: ...
David Poxon's user avatar
0 votes
1 answer
1k views

Usually on Php or in Java and in other single Inheritance Object Oriented Languages, when I am writing a software I use and Interface then and afterwards I implement the class that implements the ...
Dimitrios Desyllas's user avatar
3 votes
1 answer
604 views

I'm working on the design of a compiler for a language in which I have to use curly brace for two different purposes. I am currently stuck in writing a non-ambiguous grammar but I realized that some ...
ibi0tux's user avatar
  • 241
26 votes
1 answer
4k views

The questions are: Do generators break the functional programming paradigm? Why or why not? If yes, can generators be used in functional programming and how? Consider the following: function * ...
Pete's user avatar
  • 1,247
16 votes
3 answers
5k views

There are six primitive data types in JavaScript: Boolean, Number, String, Symbol, undefined, null A WeakMap can't have primitive data types as keys. And a WeakSet can't have primitive values. Why ...
callum's user avatar
  • 10.5k

15 30 50 per page