Free Web Development Online Tutorials, Learn to Code
Learn EcmaScript, Advance JavaScript, ES6, Ecmascript 6 Tutorial

Ecmascript 6 Tutorial

What is ES6 ?

ES6 is basically advance version of javascript also known as ecmascript 6.
Here we learn following new things about javascript

  • Default parameter values
  • JavaScript const
  • JavaScript let
  • Exponentiation (**)
  • Array.find(), findIndex()

ES6 Editor

Now before I give some examples of ES6 script syntax, I want to make sure you have some script editor installed on your local system, because new JavaScript 6 syntax may not be supported in your regular html editor, I recommend you to install VS Code edit for Nude.Js where you can write ES6 syntax or you can use ES6 Console

ES6 Syntax Example default value of unitprice is 10, so if no unitprice is assigned the default value will be considered

    function cacuatePrice(quantity , unitprice=10 )  
        return quantity * unitprice; 
    We can call the function with only mandatory parameter also.

EcmaScript Syntax
Learn ES6