Brief Javascript ES6 Tutorial For Beginners Part II

Hello Friends. Today we will be looking at part 2 of the JavaScript ES6 Tutorial. Last week we talked about ES6 and the amelioration brought to it as compared to the previous JavaScript version. And I also mentioned I got the knowledge used for the this tutorial from Udacity’s ES6 Course. Thanks to the Google Africa Challenge scholarship. The previous tutorial is here.

As I mentioned in the previous post, ES7 is out and has more features available to improve JavaScript. But we will still cover ES6 in this blog post for the same reasons I mentioned in my previous post. Enough talking. Let’s dive into another brief intro to the awesome features brought to us with ES6.

What we will be doing in this ES6 tutorial

ES6 Functions

Functions

There are several new features added to functions in JavaScript. These features are very useful in the sense that it makes functions easier to write and code easier to understand.

The Arrow Functions

Calling functions is done in a real functional programming fashion. You precise the function’s argument and use an arrow before the function’ s body. Just as what is shown in this example.

The new Classes

Classes in ES6 are better than in previous JavaScript versions, but it is still an illusion. Thanks to the constructor brought in ES6, creating classes is a lot easier. Here are the basics about objects.

You can make classes inherit from other classes. You do this with the extend keyword. Inheritance here works as you will expect from other languages just that there are no private or public functions or properties.

Conclusion

With these features explained briefly, fully understanding ES6 will be easy after reading through this post. And for any beginner, this brief introduction should be in my opinion easy to understand and quick to go through.

If you liked this post, or it was useful to you, please 👍 like it, share it on twitter, facebook or other social media… in case you want to get updated on any new useful post, follow me on twitter and like my page on facebook.