ES6 Modules Overview
To learn about ES6 Modules, you have to have Node.js and the typescript compiler tsc installed as described in previous tutorial. This is because at the time of this writing, browsers have not...
read moreExample of set in Javascript ES6
Here is an example of iterating through the values of a set in ES6… Unlike Map, it can only contain unique values. You add to a set using “add” instead of “set”....
read moreExample of Map in Javascript ES6
With ES6, we have Map where we can store key value pairs using the “set” method… We get elements out using “get” method. The map has a property of size to indicate...
read moreExample of for-of block in Javascript ES6
While in previous tutorials, we used the forEach method to iterate through all the elements of an array; now we can use the for-of construct like this … And you get the results as...
read moreExample of class in Javascript ES6
Here is an example of a class with constructor in Javascript ES6… The class name “Animal” is typically capitalized. The instance variable “person” is not. You...
read moreDestructuring in Javascript ES6
Here we have an object “john” assigned to “employee”. If we want to extract out the property value of “name” into a variable “n”. And the property...
read moreconst keyword in Javascript ES6
The “const” keyword has the same block scope as the “let” keyword as shown in previous tutorial. With const, whatever was assigned, can not be changed… Note that once...
read moreArrow functions in Javascript ES6
Continuing from the last tutorial, we changed the anonymous function in an arrow function like this… This is equivalent to use of anonymous function… but is much more concise. You drop...
read moreTemplate Strings in Javascript ES6
To show you template string in Javascript ES6, we continue directly from last tutorial but with one line changed… The result is the same. Instead of using the single of double quotes to mark...
read moreAll contents are opinions and are copyrighted and may contain display ads and ad links for which site may receive revenues from.
See Terms of Use and Privacy Policy.