New features in ES6 are:
- let, const and Block Scoping,
- Arrow Functions =>,
- Default Function Parameters,
- Rest and Spread,
- Object Literal Extensions,
- for…of Loops,
- Octal and Binary Literals,
- Template Literals
- Destructuring
let, const and Block Scoping:
let
let statement allows to declare variables that are limited in scope to the block, statement or expression on which it is used.
Arrow Functions =>
Arrow functions are anonymous functions with shorter syntax than a function.
Arrow function without any arguments.
var geEmployee = () => console.log(‘Employee Name’);
Default Function Parameters:
var getEmployee = function(id = 101){
console.log(id)
};
getEmployee();
Thanks,
Bimal
No comments:
Post a Comment