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
1.1k views
1 answer
    Using ES6 modules, I know I can alias a named import: import { foo as bar } from 'my-module'; And I know ... or can I?) alias a default import? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Is there a way to destructure an object in JavaScript and alias the local destructured object? Something ... more ECMAScript 6 functionality. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Let's say I have a variable that I want to export. What's the difference between export const a = 1; ... export them, what are the differences? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
810 views
1 answer
    If the let keyword introduces a proper implementation of block scope, does var any longer have a use case? I ... "well you could" standpoint. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
869 views
1 answer
    I am not asking if this is okay: Object.prototype.method = function(){}; This is deemed evil by pretty much ... the feature in the first place? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
949 views
1 answer
    I'm trying to use the new Map object from Javascript EC6, since it's already supported in the latest Firefox ... but its dependency on traceur puts me off... Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
948 views
1 answer
    I've noticed @@ used in a few pages about new ES6 features, but I don't know what exactly it means (whether it ... it's hard to google. Can someone explain it? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    If the alternative to: var Foo = require('foo'); is: import Foo from 'foo'; What is the alternative to: var Bar ... batz Could it be: import {batz} from 'foo' ? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    If I use import/export from ES6 then all my Jest tests fail with error: Unexpected reserved word I convert my object ... -legacy"] } Is there a fix for this? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
933 views
1 answer
    In coffeescript this is straightforward: coffee> a = ['a', 'b', 'program'] [ 'a', 'b', 'program' ] ... the splat only be the last thing in the destructuring? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
800 views
1 answer
    How can I find out the browser's Javascript engine version and support to ECMAScript 6? I'm using navigator. ... s version, but not the engine's version. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I have a flat JS object: {a: 1, b: 2, c: 3, ..., z:26} I want to clone the object except for one ... way to do this (preferring to use es6/7 if possible)? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
907 views
1 answer
    I'm playing with some EcmaScript 2015 features and I must say that specification is rather hard to ... place in specification which could clarify this? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
965 views
1 answer
    This question already has answers here: Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
892 views
1 answer
    Before, babel would add the line module.exports = exports["default"]. It no longer does this. What this ... Modules, Upgrading Babel, Tears, and a Solution Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
972 views
1 answer
    For example if I have two objects: var foo = { x: "bar", y: "baz" } and var oof = {} and I ... es6 destructuring syntax? perhaps something like: oof{x,y} = foo Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
813 views
1 answer
    I came across a javascript library that uses the following syntax to import libraries: import React, { Component, ... React, Component, PropTypes from 'react'; Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
933 views
1 answer
    I'm sick & tired of always having to write code like this: function shallowExtend(obj1,obj2){ var key; for ... planned? If not planned, then why not? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
932 views
1 answer
    I came across this in some example code and I am completely lost. const addCounter = (list) => { ... } Any suggestion or explaination is much appreciated. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    As you know, there is a proposal for a shortcut for .bind() function, so you can write: ::this.handleStuff and ... so it would be nice to shorten it a little. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
805 views
1 answer
    I've run into the following code in the es-discuss mailing list: Array.apply(null, { length: 5 }).map(Number ... the result of the code? What's happening here? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
806 views
1 answer
    After playing with ES6, I've really started to like the new syntax and features available, but I do have a ... prototype.doStuff = function() {}; // etc Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I am using ReactJS. When I run the code below the browser says: Uncaught TypeError: Super expression must ... saves someone else three days of precious life. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
857 views
1 answer
    Can anyone explain how the why/how the below method of assigning keys in JavaScript works? a = "b" c = {[a]: "d"} return: Object {b: "d"} Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
911 views
1 answer
    This question already has answers here: Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I know that ES6 is not standardized yet, but a lot of browsers currently support const keyword in JS. In spec, it ... ? I tried it in the latest chrome and FF29 Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
847 views
1 answer
    If I want to call a function like this: moo({ a: 4 }); Normally I'd have to phrase my function definition like this ... (a); // prints 4 } What is this feature? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
906 views
1 answer
    The question I have is best given by way of this jsfiddle, the code for which is below: var a = 1, b = 'x ... data structure is f? Is it just a shorthand for d? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...