Questions tagged as 'ecmascript-6'

3
answers

What is Transpilation?

I started reading a article on EcmaScript 6 and I came across the term Transpilation , which in Portuguese would be Transpilation . Besides that, I noticed that other articles use this term. It's the first time in my programming life that...
asked by 14.03.2017 / 12:58
3
answers

What is the definition of verbose code? And why is it interesting to reduce it?

Recently I've heard about verbose code reduction (along with the term boiler plate code ), and also studying ES6 by falling into arrow-functions . Would you like a clearer definition of what verbose code would be? And why is it interesting to...
asked by 23.12.2016 / 12:26
3
answers

What is the difference between the for ... of and the for..in?

I was checking out this SOEN question and there I saw this for..of . I've never seen this before in Javascript . This is a new feature and we can already implement it reliably, or should we still use the old for..in ?...
asked by 02.10.2015 / 17:58
1
answer

How does Symbol work in ES6?

In the new Javascript specification ECMAScript (ES6) was created a new primitive type called Symbol() what is its usefulness? / p>     
asked by 02.12.2015 / 20:41
2
answers

What does the "=" operator mean?

I was seeing some solutions in JavaScript and in one case I saw this command line: return args.reduce((s, v) => s + v, 0); . But I do not know what the => operator means. What's his role?     
asked by 21.02.2016 / 01:09
1
answer

var, const or let? Which one to use?

Recently I discovered the existence of let and const but now I am in doubt which to use constantly? And why do I never see codes with let or const ?     
asked by 20.05.2017 / 07:59
2
answers

Reference loss in function call

Scenery: class ClassName { constructor(service, params) { this.service = service; this.params = params; this.save(params.id); } save(id) { const { service, onSuccess, onError } = this; re...
asked by 18.01.2017 / 14:08
1
answer

What are the improvements that the Spread Operator implementation will bring to the javascript?

I'm taking a look at new features of EcmaScript6 and saw that Spread Operator was implemented. It looks very similar to variadic function of PHP (which also uses Spread Operator ). Here's an example of how the di...
asked by 03.02.2016 / 16:30
2
answers

What's the difference in declarations with [] and {} in JavaScript?

var a=[] var b={} What's the difference in declarations with [] and {} in JavaScript? And in which context is it best to use each? Question in English: SOen     
asked by 20.11.2017 / 23:20
1
answer

How does ES7 async / await work?

ES7 allows you to use a new syntax to work with Promises known as async / await functions. How can I use these functions and how are they compared to functions that use Promises to process data sequences and in parallel?     
asked by 24.08.2016 / 00:41