Skip to main content

Questions tagged [ecmascript-6]

The 2015 version of the ECMAScript specification, now a standard (ECMAScript 2015). Only use this tag where the question specifically relates to new features or technical changes provided in ECMAScript 2015.

0 votes
2 answers
38 views

Google Apps Script dayjs Plugin Import

I am trying to use the dayjs library in my Google apps script and some of its plugins. I first added the library to my project by searching for the following script ID: ...
Samuel Alito's user avatar
0 votes
0 answers
26 views

How do get search filter data in es6

// Filter rows based on string values and exclude from whiteList const whiteList = rows.map(sel => sel.RuleAutoID); // Array of IDs to exclude console.log('whiteList', whiteList); // Assuming you'...
user1931511's user avatar
-1 votes
0 answers
32 views

Javascript Execution Context Internal Implementation [closed]

How is the javascript Execution Context actually implemented? How is the lifecycle of execution context managed? What are all the things that an execution context cannot do? Or can it handle ...
Rachit Shukla's user avatar
0 votes
0 answers
26 views

I am trying to work with ES6 Proxies but am noticing something super weird, it is getting called twice [closed]

I am trying to implement a simple backbone model which has handlers for change and delete events on the model. The change handler for changing the value of a property gets executed 2 times instead of ...
anipendakur's user avatar
0 votes
0 answers
18 views

Prototype is showing multiple times [duplicate]

I have implemented inheritance as below: class Animal { constructor(name) { this.name = name; } speak() { console.log(${this.name} is making noise.)...
meallhour's user avatar
  • 15.1k
1 vote
1 answer
25 views

Animation keep restarting with update() instead of playing normally in Phaser 3

I'm using the latest version of Phaser 3, javascript only (no TS). I have my main scene that contains an update to a Sprite object within its self update method, like so: MainGame.js export default ...
Koffee's user avatar
  • 353
1 vote
1 answer
68 views

How do await and Promise.resolve() test whether their arg is a thenable?

I would like to be able to reason about what await will do when it is called on various kinds of values. The MDN documentation for await describes the decision procedure for that, one of the steps ...
Don Hatch's user avatar
  • 5,262
0 votes
1 answer
41 views

Confusion about javascript modules and webpack: The requested module ... does not provide an export named 'default'

I am trying to set up webpack in our javascript project and we want to write new javascript es6 classes, bundle them via webpack and then reuse the packages. I set up a simple example where i define a ...
flixe's user avatar
  • 626
0 votes
2 answers
49 views

How to see if an array includes a nested array with specific values?

How to correctly iterate through shipMisses array to see if it contains the nested array with the specific values [2, 4] (the dName variabe)? Here is my code: shipMisses.includes(dName) // shipMisses =...
Monnt's user avatar
  • 13
1 vote
1 answer
65 views

How do I export await multiple objects in javascript?

There's an example in MDN here, const colors = fetch("../data/colors.json").then((response) => response.json()); export default await colors; However, I have multiple constants that are ...
fedd's user avatar
  • 902
0 votes
0 answers
31 views

Figma plugin API delay in loading all children form a node

I am working on developing a Figma plugin using their API. As per the below code, I'm trying to access a specific node in the mainLayer.children, but when mainLayer is logged to the console it shows ...
Abhishek Konnur's user avatar
-1 votes
0 answers
26 views

Converting a response to json when using Parcel error

Error message: "Unexpected token '<', "<!DOCTYPE "... is not valid JSON" keeps showing when I run my program using parcel, but when I use live server it's seems to be fine. ...
theSpellBinder's user avatar
-2 votes
0 answers
26 views

Javascript find nested object based on attribute name [duplicate]

Given I have a Javascript object as below; { "reports": [ { "folderName": "FOLDER-1", "folderCat": [ { ...
copenndthagen's user avatar
-1 votes
1 answer
36 views

Using "type": "module" in package.json breaks javascript default parameters

I have a package.json file that contains the line "type": "module",. This line triggers errors when running node a_script.js. Its as if the default parameter functionality of ...
erikejan's user avatar
0 votes
7 answers
111 views

Array of objects reducing based on multiple parameters

Need to reduce an array of Objects to return the highest value of the same name. Need the following, [ { name: 'a', value: 20, ...(other object values) }, { ...
caiovisk's user avatar
  • 3,759

15 30 50 per page
1
2 3 4 5
1999