ECMA Script - ES6 Features

 Why Should I Learn ES6?
React uses ES6, and you should be familiar with some of the new features like:
Classes
Arrow Functions
Variables (let, const, var)
Array Methods like .map()
Destructuring
Modules
Ternary Operator
Spread Operator

function calc(a,b){
const add = a+b;
const sub = a-b;
const mul = a*b;
const div = a/b;
return [add,sub,mul,div];
}
const [add,sub,mul,div] = calc(2,2);
console.log(calc(2,2));

Comments

Popular posts from this blog

PUTTY - The server's host key is not cached in the registry cache

OIM-12c Installation - FMW - SOA - IDM

Apache Kafka - Zookeeper