ES6 Class Tutorial

es6 class tutorial

Object Oriented Programmers Rejoice! ES6 now has support for classes! This ES6 Tutorial will look at how JavaScript now has a class keyword as of ES6, and you can make use of it to program in a similar way as to how you might in C#, Java, or PHP. Classes in ES6 are definitely a step in the right direction to achieving true object oriented programming, but truth be told, these are not classes in the purest sense of the word.…

ES6 Modules With Traceur.js

ES6 Modules With Traceurjs and Systemjs

Let’s now jump into learning about ES6 modules. For this lesson, we are going to be making use of a fantastic piece of software for modern JavaScript development. Traceur.js by Google is a JavaScript compiler that is super easy to use, and is great if you don’t want to be bogged down by a massive build system. All you have to do is include Traceur in your page, and you’re good to go.…

ES6 Object Literal Enhancements

ES6 Object Literal Enhancements

Object Literals in ES6 have seen some improvements over their ES5 predecessors. These improvements help developers to solve problems with less typing and less code. In addition to this, many find the new syntax styles to be more concise and easier to understand. In this ES6 tutorial, we’ll take a look at Object Enhancements such as Object Literal Shorthand, Object Method Shorthand, Computed Object Keys, and Object Destructuring.…

ES6 Rest Parameters and Spread Operators

rest parameter spread operator

This section of our series on ES6 features looks at the new Rest and Spread Operators. An almost constant requirement in programming is the ability to easily take a group of values, and put them into an array. Additionally, it is also quite common to need to take values in an array, and extract each value to it’s own entity so to speak. The new Rest and Spread operators do just that for us when writing JavaScript in ES6.…

Default Function Parameters In ES6

default function parameters in es6

It’s a little bit surprising that before ES6, JavaScript did not have support for default values given to function parameters. Most languages allow you to set a default value to any particular function parameter during the declaration of that function. This is what makes it possible to use a function with both mandatory parameters and optional parameters. If you didn’t provide the optional parameter, it would just get set to a default.…