Traceur 17
Traceur ES6 For Of Loop
ES6 provides For…Of loop for iterate over a Array Element. The For…Of loop can be used to iterate over Array,arguments,Map and Set objects. In this demo, “We will learn to used For…Of loop to iterate over an array”. The following code contains a array named fruitList containing many fruit names.A For…Of loop is used to […]
Traceur ES6 Destructuring Assignment
ES6 provides the feature of defining and initializing multiple variable in single shot.This process is called Destructuring assignment of variables. In this demo, “We will learn to define and initial multiple variables using destructuring”. In the following code we have 3 variables name,subject and score are defined and assigned with values from aStudentData object which […]
Traceur ES6 Computed Property Name For JavaScript Object
ES6 provides feature to support dynamic property name creation. A dynamic property can be defined using square bracket []. In this Demo, “We will learn to create a dynamic property of a JavaScript object”. The following code shows a student object aStudent containing 3 dynamic properties name,score and subject and static property country. var property1 […]
Traceur ES6 Default Parameter Values
ES6 provides a feature for passing default values of input parameters. The default value of a parameter can be configured using Assignment Parameter(=). In this Demo, “We will learn to configure default values of input parameters”. The following code contains 2 method multiplyTwoNumbers() for multiplication of 2 numbers and Student() for creating student object.The multiplyTwoNumbers() […]