Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged ecmascript

0 votes
508 views
1 answer
    In ES6, Maps and Sets can use Objects as keys. However since the ES6 specification does not dictate the ... Any information will be appreciated! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
682 views
1 answer
    Lets say I have an object const obj = { width: 100, height: 200 } I wish to pass that object to a method ... = localHeight - 50) } = obj See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
655 views
1 answer
    In ES6, I can create static methods like below. But I need to define a static constructor but no success. I need ... console.log("blabla"); } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
514 views
1 answer
    Consider the following implementation of take: const take = (n, [x, ...xs]) => n === 0 || x === undefined ? [ ... (1, [undefined, 1])); // [] See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
385 views
1 answer
    Recently I ran into some interesting facts about named function expressions (NFE). I understand that the ... find much discussion online. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
549 views
1 answer
    I am a bit new to javascript ES6, and I am having difficulty understanding why the below is not functioning as ... true - returns false Thanks! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
492 views
1 answer
    function func(x = y, y = 2) { return [x, y]; } func(); // ReferenceError: y is not defined func( ... and why this can run without an exception? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
434 views
1 answer
    Is the "initial global execution context" ever popped off the call stack in JavaScript? I am talking about the ... is pushed onto the stack? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
591 views
1 answer
    Why is this not valid when using the new es6 destructuring syntax var a, b, c; {a, b, c } = {a:1, ... reason, I'm just trying to understand why. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
474 views
1 answer
    I encounter a very tricky case: class C { // class method are implicit in strict mode by default static method() ... of this in the above case? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
574 views
1 answer
    The code of my frontend library is split into several source files. Example: // a.ts function a() {} // b.ts ... there a better way to do that? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
649 views
1 answer
    There is no detalied explanation of what exactly es6 import and export do under the hood. Someone describe import ... does not know that. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
668 views
1 answer
    In D3.js v4, when registering an event listener through a traditional callback function, this references the current ... from an arrow function? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
472 views
1 answer
    Is an iterable the same as an iterator, or are they different? It seems, from the specifications, an iterable ... the iterator. Is that correct? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
438 views
1 answer
    Is an iterable the same as an iterator, or are they different? It seems, from the specifications, an iterable ... the iterator. Is that correct? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
816 views
1 answer
    I would like to use the ES6 spread operator to convert a NodeList to an Array. My project uses TypeScript and ... method like Object.keys()? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
536 views
1 answer
    Is it needed to learn TypeScript for Angular 2? Can Angular 2 be used with plain JavaScript ? Edit: I've ... to use ES5 JavaScript directly. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I'm using an arrow function and it's complaining about a parsing error: Parsing Error: Unexpected token = ... this from a particular function. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
513 views
1 answer
    I have heard that ES6 now finally permits subclassing Array. Here's an example given by class Stack extends Array { ... or a limitation of ES6? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
494 views
1 answer
    function createProxy() { const myArray = [Math.random(), Math.random()]; return new Proxy(myArray, {}); } const ... no way to get the target :( See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
536 views
1 answer
    What's the difference between .call() and super()? Is super() just an es2015 thing? Or does .call() have more functionality? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I am just getting started with the Jest test framework and while straight up unit tests work fine, I am having ... plain webpack, babel, es6. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
645 views
1 answer
    As of ES6, JavaScript has a proper Map object. I don't see a way to use a literal notation though, as you could with ... bar: "Bar" }; Map: ??? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
566 views
1 answer
    As of ES6, JavaScript has a proper Map object. I don't see a way to use a literal notation though, as you could with ... bar: "Bar" }; Map: ??? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
534 views
1 answer
    I finally gave up and wrote a for loop to initialize a simple array of objects where each object has an ... sampleData, isLoading: true }; See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
712 views
1 answer
    I am attempting to import everything from a library as a hash, modify it, and re-export the modified hash, ... statements must be top level. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
448 views
1 answer
    ES6 onwards we have const. This is not allowed: const x; //declare first //and then initialize it if( ... to conditionally create a constant? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
440 views
1 answer
    So after a big argument/debate/discussion on the implementation of null and undefined in javascript I'd like ... first, feel very inconsistent. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...