Traceur ES6 Numeric Literal
ES6 provides support for Numeric literal like Binary,Octal and Hexadecimal number. The symbols for representing binary,octal and hexadecimal numbers are 0b,0x,0x respectively. In this demo,”We will learn about ES6 Numerical Literal”. The following code contains the Binary,Octal and Hexadecimal representation of decimal number 17. var aBinaryNumber = 0b10001; console.log("BINARY 0b10001 in DECIMAL: "+aBinaryNumber); var aOctalNumber […]
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 […]