Open utterances-bot opened 3 years ago
Its much beneficial and to the point, Thanks!
Wow. This is very helpful.
simple and powerful for me ,good good learn , day day up,好好学习 ,天天向上
This is very helpful. Thanks a lot
Col stuff out there
Col stuff out there
Col stuff out there
I like the way you can post comments here by logging into github?
I also like this concise intro to to es6 that provides excellent context by way of the es5 examples. I only came to read the bit on spread syntax and ended up reading the whole page.
Awesome site by the way. Obviously multi talented.
When you're overwhelmed with information about new stuff (and not so new in fact) this is the kind of writing we need. Thanks a lot.
This was really helpfull! Thanks for explain very detallist. I really integrated the concepts and new features about ES6
Useful reference page for ES6 syntax (thumb up)
Very Helpful Article about new ES6 Features I was looking for. Also MDN References are great addition to learn about these topics more deeply. Thanks Tania :)
Really appreciate for this summary article
Great summary to have quick guide about ES6. Only one suggestion @taniarascia. The table of contents would be a bit more useful if items on it were clickable. Thank you for your work 🙂.
Great and immensely helpful summary of changes between ES5 and ES6. One observation on the ES5 example on inheritance. If I copy/paste and run the full example, and then print out y.constructor
it gives the below
ƒ Func(a, b) {
this.a = a
this.b = b
}
Constructor should be ƒ Inheritance(a, b) {...
because Inheritance
was the constructor function use to create y
. That can be fixed by executing this line:
Inheritance.prototype.constructor = Inheritance
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor
In the example above the exception will be shown since the constructor links to Parent. To avoid this, just assign the necessary constructor you are going to use.
Although, the MDN docs do go on to say that depending of the role of the constructor, in some cases this reassignment is not necessary, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor
Note: Manually updating or setting the constructor can lead to different and sometimes confusing consequences. To prevent this, just define the role of constructor in each specific case. In most cases, constructor is not used and reassignment of it is not necessary."), so I guess it depends
So I guess it all depends. Cheers!
Though i understand that it might be a typo, but here it should be "immutable" only in place of "not immutable". Please correct it as a lot of people take your blogs as reference.
@Prateek-Tewari My original statement is correct. const
is not immutable. Example:
const list = []
list.push('something')
console.log(list) // ['something']
thank for informations
Your work simplifies for me!
@Prateek-Tewari My original statement is correct.
const
is not immutable. Example:const list = [] list.push('something') console.log(list) // ['something']
@taniarascia If you look into the definition provided by MDN as well, const holds an immutable reference to mutable values like an object. Hence,in my opinion,it can't be said with conviction what's written in your post. In case of a normal variable declared with const, we can not overwrite its value. For example : const name = "Tania" name = "Prateek" ( Not allowed,will throw error). But with objects,we can do that. Hence it has more to do with reference type data structures rather then const being not immutable. If it's not immutable,it should be able to change the value in all the cases and not exhibit different behaviour for different purposes like variables stored by value and variables stored by reference. Please read it again and clarify. I may be totally wrong but surely want to learn something here that I might be missing altogether. Thanks in advance. 🙂
@Prateek-Tewari My original statement is correct.
const
is not immutable. Example:const list = [] list.push('something') console.log(list) // ['something']
@taniarascia If you look into the definition provided by MDN as well, const holds an immutable reference to mutable values like an object. Hence,in my opinion,it can't be said with conviction what's written in your post. In case of a normal variable declared with const, we can not overwrite its value. For example : const name = "Tania" name = "Prateek" ( Not allowed,will throw error). But with objects,we can do that. Hence it has more to do with reference type data structures rather then const being not immutable. If it's not immutable,it should be able to change the value in all the cases and not exhibit different behaviour for different purposes like variables stored by value and variables stored by reference. Please read it again and clarify. I may be totally wrong but surely want to learn something here that I might be missing altogether. Thanks in advance. 🙂
mutable and not immutable are not same, Thats why @taniarascia is not wrong
good its very helpful
wow!
very very helpful
ES6 Syntax and Feature Overview | Tania Rascia
ECMAScript 2015, also known as ES6, introduced many changes to JavaScript. Here is an overview of some of the most common features and…
https://www.taniarascia.com/es6-syntax-and-feature-overview/