Javascript 51
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() […]
Traceur Compiling ES6 Spread Operator
ES6 provides another useful operator called spread operator to work with Array. Spread operator is represented by 3 dots prefixed with a variable name.For example …fruitArray . In this demo, “We will learn to use spread operator by an example”. Spread operator is similar to an inline function which expand it self on the called […]
Traceur Compiling ES6 Block Scope Binding Using Let Keyword
ES6 provides the true block scope binding using Let keyword. let allows us to declare variables that are limited in scope to the block, statement, or expression on which it is used. variable declared in var keyword are global or local to an entire function regardless of block scope. In this demo, “We will learn […]